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:
SPFab authored and GitHub committed 2021-08-21 16:40:24 +03:00
1 parent 6c46b217af
commit ff0933ca03
8 files changed
+209 -4

No files matched your search

+18
View File
@@ -66,6 +66,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 '"')
@@ -118,6 +120,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)
@@ -410,6 +413,17 @@ direction and jump to the next/previous match.
(See also 'globsearch', 'incsearch', 'wrapscan', 'ignorecase', 'smartcase',
'ignoredia', and 'smartdia' options and 'Searching Files' section)
filter (modal)
setfilter
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.
(See also 'globsearch', 'incfilter', 'ignorecase', 'smartcase', 'ignoredia',
and 'smartdia' options)
mark-save (modal) (default 'm')
Save the current directory as a bookmark assigned to the given key.
@@ -618,6 +632,10 @@ Ignore diacritics in sorting and search patterns.
Jump to the first match after each keystroke during searching.
incfilter bool (default off)
Apply filter pattern after each keystroke during filtering.
info []string (default '')
List of information shown for directory items at the right side of pane.