Skip to content
Myr

Update README.md (#2321)

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

- Correct spelling/grammar

authored by Vlad Doster · committed by GitHub · parent 9ddf5c7 · Browse files · 1 file+16 added−16 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+16 added−16 removed

  • other:+16 added−16 removed

1 file+16 added−16 removed

modified:README.md+16 added-16 removed
15 unmodified lines
16- Blazingly fast17- The most comprehensive feature set18- Flexible layout19- Batteries included20 - Vim/Neovim plugin, key bindings and fuzzy auto-completion20 - Vim/Neovim plugin, key bindings, and fuzzy auto-completion2122Table of Contents23-----------------24
140 unmodified lines
165166Upgrading fzf167-------------168169fzf is being actively developed and you might want to upgrade it once in a169fzf is being actively developed, and you might want to upgrade it once in a170while. Please follow the instruction below depending on the installation171method used.172173- git: `cd ~/.fzf && git pull && ./install`
42 unmodified lines
216```sh217vim $(fzf --height 40%)218```219220Also check out `--reverse` and `--layout` options if you prefer220Also, check out `--reverse` and `--layout` options if you prefer221"top-down" layout instead of the default "bottom-up" layout.222223```sh224vim $(fzf --height 40% --reverse)
105 unmodified lines
330- `ALT-C` - cd into the selected directory331 - Set `FZF_ALT_C_COMMAND` to override the default command332 - Set `FZF_ALT_C_OPTS` to pass additional options333334If you're on a tmux session, you can start fzf in a tmux split pane or in334If you're on a tmux session, you can start fzf in a tmux split-pane or in335a tmux popup window by setting `FZF_TMUX_OPTS` (e.g. `-d 40%`).336See `fzf-tmux --help` for available options.337338More tips can be found on [the wiki page](https://github.com/junegunn/fzf/wiki/Configuring-shell-key-bindings).
3 unmodified lines
342343#### Files and directories344345Fuzzy completion for files and directories can be triggered if the word before346the cursor ends with the trigger sequence which is by default `**`.346the cursor ends with the trigger sequence, which is by default `**`.347348- `COMMAND [DIRECTORY/][FUZZY_PATTERN]**<TAB>`349350```sh351# Files under current directory351# Files under the current directory352# - You can select multiple items with TAB key353vim **<TAB>354355# Files under parent directory
15 unmodified lines
371372#### Process IDs373374Fuzzy completion for PIDs is provided for kill command. In this case,375there is no trigger sequence, just press tab key after kill command.375there is no trigger sequence; just press the tab key after the kill command.376377```sh378# Can select multiple processes with <TAB> or <Shift-TAB> keys379kill -9 <TAB>380```381382#### Host names383384For ssh and telnet commands, fuzzy completion for host names is provided. The384For ssh and telnet commands, fuzzy completion for hostnames is provided. The385names are extracted from /etc/hosts and ~/.ssh/config.386387```sh388ssh **<TAB>
79 unmodified lines
468```469470- The arguments before `--` are the options to fzf.471- After `--`, simply pass the original completion arguments unchanged (`"$@"`).472- Then write a set of commands that generates the completion candidates and472- Then, write a set of commands that generates the completion candidates and473 feed its output to the function using process substitution (`< <(...)`).474475zsh will automatically pick up the function using the naming convention but in476bash you have to manually associate the function with the command using476bash you have to manually associate the function with the command using the477`complete` command.478479```sh480[ -n "$BASH" ] && complete -F _fzf_complete_doge -o default -o bashdefault doge
27 unmodified lines
508### Performance509510fzf is fast and is [getting even faster][perf]. Performance should not be511a problem in most use cases. However, you might want to be aware of the512options that affect the performance.512options that affect performance.513514- `--ansi` tells fzf to extract and parse ANSI color codes in the input and it514- `--ansi` tells fzf to extract and parse ANSI color codes in the input, and it515 makes the initial scanning slower. So it's not recommended that you add it516 to your `$FZF_DEFAULT_OPTS`.517- `--nth` makes fzf slower as fzf has to tokenize each line.517- `--nth` makes fzf slower because it has to tokenize each line.518- `--with-nth` makes fzf slower as fzf has to tokenize and reassemble each519 line.520- If you absolutely need better performance, you can consider using521 `--algo=v1` (the default being `v2`) to make fzf use a faster greedy
40 unmodified lines
562563#### 3. Interactive ripgrep integration564565The following example uses fzf as the selector interface for ripgrep. We bound566`reload` action to `change` event, so every time you type on fzf, ripgrep566`reload` action to `change` event, so every time you type on fzf, the ripgrep567process will restart with the updated query string denoted by the placeholder568expression `{q}`. Also, note that we used `--phony` option so that fzf doesn't569perform any secondary filtering.570
17 unmodified lines
588Your `$SHELL` is used to execute the command with `$SHELL -c COMMAND`.589The window can be scrolled using the mouse or custom key bindings.590591```bash592# {} is replaced to the single-quoted string of the focused line592# {} is replaced with the single-quoted string of the focused line593fzf --preview 'cat {}'594```595596Preview window supports ANSI colors, so you can use any program that
63 unmodified lines
660# To apply the command to CTRL-T as well661export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"662```663664If you want the command to follow symbolic links, and don't want it to exclude664If you want the command to follow symbolic links and don't want it to exclude665hidden files, use the following command:666667```sh668export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
33 unmodified lines