Fzf: Difference between revisions
From wikinotes
(Created page with " fzf serves two primary roles: * a generic fuzzy finder for files/dirs on the CLI * a shell library to extend aliases or methods to use a fuzzy finder I have only barel...") |
No edit summary |
||
Line 1: | Line 1: | ||
fzf is a tool that lets you fuzzy search lines piped to it on stdin. | |||
fzf | = Documentation = | ||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| github || https://github.com/junegunn/fzf | |||
|- | |||
|} | |||
</blockquote><!-- Documentation --> | |||
= Usage = | |||
<blockquote> | |||
== Keybindings == | |||
<blockquote> | |||
Default Keybindings | |||
<syntaxhighlight lang="yaml"> | |||
up/down # go up/down entry | |||
tab # mark entry as selected (when multi-select active) | |||
enter # single-select and exit | |||
# type # search results | |||
</syntaxhighlight> | |||
You can set your own keybindings as well | |||
<syntaxhighlight lang="bash"> | |||
export FZF_DEFAULT_OPTS='\ | |||
--bind \ | |||
ctrl-a:select-all,\ | |||
ctrl-d:deselect-all' | |||
</syntaxhighlight> | |||
</blockquote><!-- Keybindings --> | |||
== CLI Usage == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
result=$(find . | fzf +m) # choose single | |||
results=($(find . | fzf -m)) # choose single or multiple | |||
</syntaxhighlight> | |||
</blockquote><!-- CLI Usage --> | |||
</blockquote><!-- Usage --> |
Revision as of 23:06, 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 resultsYou can set your own keybindings as well
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