Added filter command (#667)
* added first version of interactive filter * small fix when loading new file * don't reset filter when directory is reloaded automatically * reapply filter when options for searching change * current filter or arguments now prefilled in the prompt * empty filter can now be supplied * added new setfilter command for use in scripts * added incfilter option * added very basic documentation * added filter indication in statusbar * added option to display filter to prompt
This commit is contained in:
1 parent
6c46b217af
commit
ff0933ca03
8 files changed
+209
-4
No files matched your search
@@ -77,6 +77,8 @@ The following commands are provided by lf:
|
||||
search-back (modal) (default '?')
|
||||
search-next (default 'n')
|
||||
search-prev (default 'N')
|
||||
filter (modal)
|
||||
setfilter
|
||||
mark-save (modal) (default 'm')
|
||||
mark-load (modal) (default "'")
|
||||
mark-remove (modal) (default `"`)
|
||||
@@ -133,6 +135,7 @@ The following options can be used to customize the behavior of lf:
|
||||
ifs string (default '')
|
||||
ignorecase bool (default on)
|
||||
ignoredia bool (default on)
|
||||
incfilter bool (default off)
|
||||
incsearch bool (default off)
|
||||
info []string (default '')
|
||||
mouse bool (default off)
|
||||
@@ -481,6 +484,15 @@ Read a pattern to search for a file name match in the forward/backward direction
|
||||
.PP
|
||||
(See also 'globsearch', 'incsearch', 'wrapscan', 'ignorecase', 'smartcase', 'ignoredia', and 'smartdia' options and 'Searching Files' section)
|
||||
.PP
|
||||
.EX
|
||||
filter (modal)
|
||||
setfilter
|
||||
.EE
|
||||
.PP
|
||||
Read a pattern to filter out and only view files matching the pattern. setfilter does the same but uses an argument to set the filter immediatly. You can supply an argument to filter, in order to use that as the starting prompt.
|
||||
.PP
|
||||
(See also 'globsearch', 'incfilter', 'ignorecase', 'smartcase', 'ignoredia', and 'smartdia' options)
|
||||
.PP
|
||||
.EX
|
||||
mark-save (modal) (default 'm')
|
||||
.EE
|
||||
@@ -722,6 +734,12 @@ Ignore diacritics in sorting and search patterns.
|
||||
.PP
|
||||
Jump to the first match after each keystroke during searching.
|
||||
.PP
|
||||
.EX
|
||||
incfilter bool (default off)
|
||||
.EE
|
||||
.PP
|
||||
Apply filter pattern after each keystroke during filtering.
|
||||
.PP
|
||||
.EX
|
||||
info []string (default '')
|
||||
.EE
|
||||
|
||||
Reference in new issue
Block a user