We already know the $EDITOR, the $VISUAL, the $PAGER, and all of the usual UNIX commands.
It seems that the interactive filter fits well in this ecosystem of commands.
You can think of it as an interactive grep . It takes lines from stdin, display them on screen, and prompt user for input to match against these lines, and filter only the lines that matches. The user can select the input candidates somehow, and while selection is made, the result is sent to stdout, to be exploited by the next command.
This is a feature that has often been integrated to softwares, such as a web browser for the URL bar, start menus to find applications, and even web pages such as search engines…
It seems that there are also a lot available for the terminal as well. I am presenting those that I know, in the order they come to my mind.
I will try to update this list according to the comments.
Fuzzy matchingThey match any string with the character of the input in the same order. Just like if we put a wildchar between every character of the input.
This often comes with re-ordering the lines to put the shortest one at the top of the list.
fzf - Go Prompt at bottom by default; Integration with bash and zsh, tmux, vim, ps… Binaries for linux, Mac, windows, Android (probably for termux and chroots). Not the fastest, but is totally asynchronous: Butter smooth interface. Uses “alternate screen”: fullscreen only Fancy interface. head -n 10000 /dev/urandom | fzf perfect! Just like plain lines!Many features, pretty popular. Still not perfect for me, I like tools written in C for command line interactions, and I do not want something that big. It is not bloated, just bigger than what I want.
fzy - C Accurate fuzzy matching by calculating scores for each match; Very fast, the fastest I have found for this accuracy; Simple interface; Integration with vim; head -n 10000 /dev/urandom | fzy not bad, did not segfault. Valgrind said: No error, no leak possible \o/ gof - GoStrangely looking similar to fzf, maybe the two projects are related. This version is much smaller.
Simple tool that does fuzzy filtering efficiently.
pick - CSimple and works well.
tmenu - CSimple tool that works well, with a great effort on making it reliable (only C99 source code) with no dependency. It still supports line editing, with emacs-like keybindings.
pmenu - python No dependency other than python; Most Recently Used feature; Has a large list of alternative, for both terminal and GUI. selecta - rubyWith a ranking algorithm.
icepick - rustRe-write of selecta in rust for performance.
heatseeker - rustRe-write of selecta in rust for performance.
gpicker - C Scoring to order most relevant matches Uses caching of the find command. hf - Go Propose you to run a command after you selected a match, with $FILE holding the name of the file. Integration with git, vim… hmenu - haskellSimple, in haskell, oriented to pick files.
Plain string matchingThe input string is filtered as is.
percol - python Feature rich Can select multiple lines at once Lots of customization, through a python-based configuration file. peco - GoMade after percol, re-write in Go to make in faster and do not require python.
tpick - CUsing ncurses, but very small, about 300 lines
PathPicker - Python Multiple selections; Oriented to select files and open them with a command; Integration with tmux. Word matchingInput is splitted at every space, and each word is matched independently like in a search engine.
slmenu - CFor single-line menu: really an equivalent of dmenu for the command line:
supports horizontal and vertical interface; share some code with dmenu; support top/bottom of the terminal;A more maintained version is present in the vis repo : vis-menu.
selector - CSupports regexp, and ‘;’ as separator for words
iomenu - CThe one I made, so that I could has these two things:
Comments at the right of lines that does not get matched by the input and not printed out Headers that are always displayed organize input in multiple categories.It is not better than the others, it just has a different approach.
SpecificThose that are not exactly filters, but that are still convenient and useful.
smenu - CHorizontal selection dialogues using arrow keys for selection.