Fzf: Difference between revisions

From wikinotes
No edit summary
Line 22: Line 22:
</syntaxhighlight>
</syntaxhighlight>


You can set your own keybindings as well
You can set your own keybindings as well<br>
See '''AVAILABLE ACTIONS''' in [https://man.archlinux.org/man/community/fzf/fzf.1.en man fzf]
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
export FZF_DEFAULT_OPTS='\
export FZF_DEFAULT_OPTS='\

Revision as of 23:08, 21 July 2021

fzf is a tool that lets you fuzzy search lines piped to it on stdin.

Documentation

github https://github.com/junegunn/fzf

Usage

Keybindings

Default Keybindings

up/down  # go up/down entry
tab      # mark entry as selected (when multi-select active)
enter    # single-select and exit
# type   # search results

You can set your own keybindings as well
See AVAILABLE ACTIONS in man fzf

export FZF_DEFAULT_OPTS='\
--bind \
ctrl-a:select-all,\
ctrl-d:deselect-all'

CLI Usage

result=$(find . | fzf +m)     # choose single 
results=($(find . | fzf -m))  # choose single or multiple