diff --git a/colors.go b/colors.go index ddbb1f85..0ab5723d 100644 --- a/colors.go +++ b/colors.go @@ -268,7 +268,7 @@ func (sm styleMap) get(f *file) tcell.Style { return val } - if val, ok := sm[f.Name()]; ok { + if val, ok := sm[f.Name()+"*"]; ok { return val } diff --git a/doc.go b/doc.go index 5864f15b..7c764956 100644 --- a/doc.go +++ b/doc.go @@ -1242,7 +1242,7 @@ The full order of matchings from most specific to least are as follows: 1. Full Path (e.g. '~/.config/lf/lfrc') 2. Dir Name (e.g. '.git/') (only matches dirs with a trailing slash at the end) 3. File Type (e.g. 'ln') (except 'fi') - 4. File Name (e.g. '.git') + 4. File Name (e.g. '.git*') (only matches files with a trailing star at the end) 5. Base Name (e.g. 'README.*') 6. Extension (e.g. '*.txt') 7. Default (i.e. 'fi') @@ -1252,7 +1252,7 @@ For example, given a regular text file '/path/to/README.txt', the following entr 1. '/path/to/README.txt' 2. (skipped since the file is not a directory) 3. (skipped since the file is of type 'fi') - 4. 'README.txt' + 4. 'README.txt*' 5. 'README.*' 6. '*.txt' 7. 'fi' @@ -1262,7 +1262,7 @@ Given a regular directory '/path/to/example.d', the following entries are checke 1. '/path/to/example.d' 2. 'example.d/' 3. 'di' - 4. 'example.d' + 4. 'example.d*' 5. 'example.*' 6. '*.d' 7. 'fi' diff --git a/docstring.go b/docstring.go index 40a5824c..0e88127f 100644 --- a/docstring.go +++ b/docstring.go @@ -1401,7 +1401,7 @@ follows: 1. Full Path (e.g. '~/.config/lf/lfrc') 2. Dir Name (e.g. '.git/') (only matches dirs with a trailing slash at the end) 3. File Type (e.g. 'ln') (except 'fi') - 4. File Name (e.g. '.git') + 4. File Name (e.g. '.git*') (only matches files with a trailing star at the end) 5. Base Name (e.g. 'README.*') 6. Extension (e.g. '*.txt') 7. Default (i.e. 'fi') @@ -1412,7 +1412,7 @@ entries are checked in the configuration and the first one to match is used: 1. '/path/to/README.txt' 2. (skipped since the file is not a directory) 3. (skipped since the file is of type 'fi') - 4. 'README.txt' + 4. 'README.txt*' 5. 'README.*' 6. '*.txt' 7. 'fi' @@ -1423,7 +1423,7 @@ checked in the configuration and the first one to match is used: 1. '/path/to/example.d' 2. 'example.d/' 3. 'di' - 4. 'example.d' + 4. 'example.d*' 5. 'example.*' 6. '*.d' 7. 'fi' diff --git a/icons.go b/icons.go index cf233e72..a4122f81 100644 --- a/icons.go +++ b/icons.go @@ -109,7 +109,7 @@ func (im iconMap) get(f *file) string { return val } - if val, ok := im[f.Name()]; ok { + if val, ok := im[f.Name()+"*"]; ok { return val } diff --git a/lf.1 b/lf.1 index 233f62d0..2d036add 100644 --- a/lf.1 +++ b/lf.1 @@ -1342,7 +1342,7 @@ Note that, lf first tries matching file names and then falls back to file types. 1. Full Path (e.g. '~/.config/lf/lfrc') 2. Dir Name (e.g. '.git/') (only matches dirs with a trailing slash at the end) 3. File Type (e.g. 'ln') (except 'fi') - 4. File Name (e.g. '.git') + 4. File Name (e.g. '.git*') (only matches files with a trailing star at the end) 5. Base Name (e.g. 'README.*') 6. Extension (e.g. '*.txt') 7. Default (i.e. 'fi') @@ -1354,7 +1354,7 @@ For example, given a regular text file '/path/to/README.txt', the following entr 1. '/path/to/README.txt' 2. (skipped since the file is not a directory) 3. (skipped since the file is of type 'fi') - 4. 'README.txt' + 4. 'README.txt*' 5. 'README.*' 6. '*.txt' 7. 'fi' @@ -1366,7 +1366,7 @@ Given a regular directory '/path/to/example.d', the following entries are checke 1. '/path/to/example.d' 2. 'example.d/' 3. 'di' - 4. 'example.d' + 4. 'example.d*' 5. 'example.*' 6. '*.d' 7. 'fi'