Skip to content
Myr

Fix TOC

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 57c066f · Browse files · 1 file+26 added−26 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+26 added−26 removed

  • other:+26 added−26 removed

1 file+26 added−26 removed

modified:README.md+26 added-26 removed
31 unmodified lines
32 * [As Vim plugin](#as-vim-plugin)33* [Upgrading fzf](#upgrading-fzf)34* [Building fzf](#building-fzf)35* [Usage](#usage)36 * [Using the finder](#using-the-finder)37 * [Layout](#layout)38 * [Search syntax](#search-syntax)39 * [Environment variables](#environment-variables)40 * [Options](#options)41 * [Demo](#demo)36 * [Using the finder](#using-the-finder)37 * [Layout](#layout)38 * [Search syntax](#search-syntax)39 * [Environment variables](#environment-variables)40 * [Options](#options)41 * [Demo](#demo)42* [Examples](#examples)43* [`fzf-tmux` script](#fzf-tmux-script)44* [Key bindings for command-line](#key-bindings-for-command-line)45* [Fuzzy completion for bash and zsh](#fuzzy-completion-for-bash-and-zsh)46 * [Files and directories](#files-and-directories)47 * [Process IDs](#process-ids)48 * [Host names](#host-names)49 * [Environment variables / Aliases](#environment-variables--aliases)50 * [Settings](#settings)51 * [Supported commands](#supported-commands)52 * [Custom fuzzy completion](#custom-fuzzy-completion)46 * [Files and directories](#files-and-directories)47 * [Process IDs](#process-ids)48 * [Host names](#host-names)49 * [Environment variables / Aliases](#environment-variables--aliases)50 * [Settings](#settings)51 * [Supported commands](#supported-commands)52 * [Custom fuzzy completion](#custom-fuzzy-completion)53* [Vim plugin](#vim-plugin)54* [Advanced topics](#advanced-topics)55 * [Performance](#performance)56 * [Executing external programs](#executing-external-programs)
144 unmodified lines
201```sh202vim $(fzf)203```204205#### Using the finder205### Using the finder206207- `CTRL-K` / `CTRL-J` (or `CTRL-P` / `CTRL-N`) to move cursor up and down208- `Enter` key to select the item, `CTRL-C` / `CTRL-G` / `ESC` to exit209- On multi-select mode (`-m`), `TAB` and `Shift-TAB` to mark multiple items210- Emacs style key bindings211- Mouse: scroll, click, double-click; shift-click and shift-scroll on212 multi-select mode213214#### Layout214### Layout215216fzf by default starts in fullscreen mode, but you can make it start below the217cursor with `--height` option.218
14 unmodified lines
233```sh234export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'235```236237#### Search syntax237### Search syntax238239Unless otherwise specified, fzf starts in "extended-search mode" where you can240type in multiple search terms delimited by spaces. e.g. `^music .mp3$ sbtrkt241!fire`
19 unmodified lines
261```262^core go$ | rb$ | py$263```264265#### Environment variables265### Environment variables266267- `FZF_DEFAULT_COMMAND`268 - Default command to use when input is tty269 - e.g. `export FZF_DEFAULT_COMMAND='fd --type f'`
7 unmodified lines
277- `FZF_DEFAULT_OPTS`278 - Default options279 - e.g. `export FZF_DEFAULT_OPTS="--layout=reverse --inline-info"`280281#### Options281### Options282283See the man page (`man fzf`) for the full list of options.284285#### Demo285### Demo286If you learn by watching videos, check out this screencast by [@samoshkin](https://github.com/samoshkin) to explore `fzf` features.287288<a title="fzf - command-line fuzzy finder" href="https://www.youtube.com/watch?v=qgG5Jhi_Els">289 <img src="https://i.imgur.com/vtG8olE.png" width="640">
80 unmodified lines
370371Fuzzy completion for bash and zsh372---------------------------------373374#### Files and directories374### Files and directories375376Fuzzy completion for files and directories can be triggered if the word before377the cursor ends with the trigger sequence, which is by default `**`.378
20 unmodified lines
399# Directories under ~/github that match `fzf`400cd ~/github/fzf**<TAB>401```402403#### Process IDs403### Process IDs404405Fuzzy completion for PIDs is provided for kill command.406407```sh408# Can select multiple processes with <TAB> or <Shift-TAB> keys409kill -9 **<TAB>410```411412#### Host names412### Host names413414For ssh and telnet commands, fuzzy completion for hostnames is provided. The415names are extracted from /etc/hosts and ~/.ssh/config.416
1 unmodified line
418ssh **<TAB>419telnet **<TAB>420```421422#### Environment variables / Aliases422### Environment variables / Aliases423424```sh425unset **<TAB>426export **<TAB>427unalias **<TAB>428```429430#### Settings430### Settings431432```sh433# Use ~~ as the trigger sequence instead of the default **434export FZF_COMPLETION_TRIGGER='~~'
29 unmodified lines
464 esac465}466```467468#### Supported commands468### Supported commands469470On bash, fuzzy completion is enabled only for a predefined set of commands471(`complete | grep _fzf` to see the list). But you can enable it for other472commands as well by using `_fzf_setup_completion` helper function.
3 unmodified lines
476_fzf_setup_completion path ag git kubectl477_fzf_setup_completion dir tree478```479480#### Custom fuzzy completion480### Custom fuzzy completion481482_**(Custom completion API is experimental and subject to change)**_483484For a command named _"COMMAND"_, define `_fzf_complete_COMMAND` function using
241 unmodified lines