fzf(1)

NAME
fzf - a command-line fuzzy finder

SYNOPSIS
fzf [options]

DESCRIPTION
fzf is a general-purpose command-line fuzzy finder.

OPTIONS

  Search mode

-x, --extended
    Extended-search mode. Since 0.10.9, this is enabled by default. You can disable it with +x or --no-extended.

-e, --exact
    Enable exact-match

-i  Case-insensitive match (default: smart-case match)

+i  Case-sensitive match

-n, --nth=N[,..]
    Comma-separated list of field index expressions for limiting search scope. See FIELD INDEX EXPRESSION for details.

--with-nth=N[,..]
    Transform each item using index expressions within finder

-d, --delimiter=STR
    Field delimiter regex for --nth and --with-nth (default: AWK-style)

  Search result

+s, --no-sort
    Do not sort the result

--tac
    Reverse the order of the input
    e.g. history | fzf --tac --no-sort

--tiebreak=CRI
    Sort criterion to use when the scores are tied
    length Prefers item with shorter length
    begin Prefers item with matched substring closer to the beginning
    end Prefers item with matched substring closer to the end
    index Prefers item that appeared earlier in the input stream

  Interface

-m, --multi
    Enable multi-select with tab/shift-tab

--ansi
    Enable processing of ANSI color codes

--no-mouse
    Disable mouse

--color=[BASE_SCHEME][,COLOR:ANSI]
    Color configuration. The name of the base color scheme is followed by custom color mappings. Ansi color code of -1 denotes terminal default foreground/background color.
    e.g. fzf --color=bg+:24
         fzf --color=light,fg:232,bg:255,bg+:116,info:27
    BASE SCHEME:
        (default: dark on 256-color terminal, otherwise 16)
        dark Color scheme for dark 256-color terminal
        light Color scheme for light 256-color terminal
        16 Color scheme for 16-color terminal
        bw No colors COLOR:
        fg Text
        bg Background
        hl Highlighted substrings
        fg+ Text (current line)
        bg+ Background (current line)
        hl+ Highlighted substrings (current line)
        info Info
        prompt Prompt
        pointer Pointer to the current line
        marker Multi-select marker
        spinner Streaming input indicator
        header Header

--black
    Use black background

--reverse
    Reverse orientation

--margin=MARGIN
    Comma-separated expression for margins around the finder.
    TRBL Same margin for top, right, bottom, and left
    TB,RL Vertical, horizontal margin
    T,RL,B Top, horizontal, bottom margin
    T,R,B,L Top, right, bottom, left margin
    Each part can be given in absolute number or in percentage relative to the terminal size with % suffix.
    e.g. fzf --margin 10%
         fzf --margin 1,5%

--tabstop=SPACES
    Number of spaces for a tab character (default: 8)

--cycle
    Enable cyclic scroll

--no-hscroll
    Disable horizontal scroll

--inline-info
    Display finder info inline with the query

--prompt=STR
    Input prompt (default: '> ')

--toggle-sort=KEY
    Key to toggle sort. For the list of the allowed key names, see --bind.

--bind=KEYBINDS
    Comma-separated list of custom key bindings. Each key binding expression follows the following format: KEY:ACTION
    e.g. fzf --bind=ctrl-j:accept,ctrl-k:kill-line
    AVAILABLE KEYS: (SYNONYMS)
        ctrl-[a-z]
        alt-[a-z]
        f[1-4]
        enter (return ctrl-m)
        space
        bspace (bs)
        alt-bspace (alt-bs)
        tab
        btab (shift-tab)
        esc
        del
        up
        down
        left
        right
        home
        end
        pgup (page-up)
        pgdn (page-down)
        shift-left
        shift-right
        double-click
        or any single character
      ACTION: DEFAULT BINDINGS:
        abort ctrl-c ctrl-g ctrl-q esc
        accept enter double-click
        backward-char ctrl-b left
        backward-delete-char ctrl-h bspace
        backward-kill-word alt-bs
        backward-word alt-b shift-left
        beginning-of-line ctrl-a home
        cancel
        clear-screen ctrl-l
        delete-char del
        delete-char/eof ctrl-d
        deselect-all
        down ctrl-j ctrl-n down
        end-of-line ctrl-e end
        execute(...) (see below for the details)
        execute-multi(...) (see below for the details)
        forward-char ctrl-f right
        forward-word alt-f shift-right
        ignore
        kill-line
        kill-word alt-d
        next-history (ctrl-n on --history)
        page-down pgdn
        page-up pgup
        previous-history (ctrl-p on --history)
        select-all
        toggle
        toggle-all
        toggle-down ctrl-i (tab)
        toggle-sort (equivalent to --toggle-sort)
        toggle-up btab (shift-tab)
        unix-line-discard ctrl-u
        unix-word-rubout ctrl-w
        up ctrl-k ctrl-p up
        yank ctrl-y
    With execute(...) action, you can execute arbitrary commands without leaving fzf. For example, you can turn fzf into a simple file browser by binding enter key to less command like follows.
        fzf --bind "enter:execute(less {})"
    {} is the placeholder for the double-quoted string of the current line. If the command contains parentheses, you can use any of the following alternative notations to avoid parse errors.
        execute[...]
        execute~...~
        execute!...!
        execute@...@
        execute#...#
        execute$...$
        execute%...%
        execute^...^
        execute&...&
        execute*...*
        execute;...;
        execute/.../
        execute|...|
        execute:...
        This is the special form that frees you from parse errors as it does not expect the closing character. The catch is that it should be the last one in the comma-separated list.
    execute-multi(...) is an alternative action that executes the command with the selected entries when multi-select is enabled (--multi). With this action, {} is replaced with the double-quoted strings of the selected entries separated by spaces.

--history=HISTORY_FILE
    Load search history from the specified file and update the file on completion. When enabled, CTRL-N and CTRL-P are automatically remapped to next-history and previous-history.

--history-size=N
    Maximum number of entries in the history file (default: 1000). The file is automatically truncated when the number of the lines exceeds the value.

--header=STR
    The given string will be printed as the sticky header. The lines are displayed in the given order from top to bottom regardless of --reverse option, and are not affected by --with-nth. ANSI color codes are processed even when --ansi is not set.

--header-lines=N
    The first N lines of the input are treated as the sticky header. When --with-nth is set, the lines are transformed just like the other lines that follow.

  Scripting

-q, --query=STR
    Start the finder with the given query

-1, --select-1
    Automatically select the only match

-0, --exit-0
    Exit immediately when there's no match

-f, --filter=STR
    Filter mode. Do not start interactive finder. When used with --no-sort, fzf becomes a fuzzy-version of grep.

--print-query
    Print query as the first line

--expect=KEY[,..]
    Comma-separated list of keys that can be used to complete fzf in addition to the default enter key. When this option is set, fzf will print the name of the key pressed as the first line of its output (or as the second line if --print-query is also used). The line will be empty if fzf is completed with the default enter key.
    e.g. fzf --expect=ctrl-v,ctrl-t,alt-s,f1,f2,~,@

--sync
    Synchronous search for multi-staged filtering. If specified, fzf will launch ncurses finder only after the input stream is complete.
    e.g. fzf --multi | fzf --sync

ENVIRONMENT

FZF_DEFAULT_COMMAND
    Default command to use when input is tty

FZF_DEFAULT_OPTS
    Default options. e.g. export FZF_DEFAULT_OPTS="--extended --cycle"

EXIT STATUS
0 Normal exit
1 Interrupted with CTRL-C or ESC

FIELD INDEX EXPRESSION
A field index expression can be a non-zero integer or a range expression ([BEGIN]..[END]). --nth and --with-nth take a comma-separated list of field index expressions.

  Examples
1 The 1st field
2 The 2nd field
-1 The last field
-2 The 2nd to last field
3..5 From the 3rd field to the 5th field
2.. From the 2nd field to the last field
..-3 From the 1st field to the 3rd to the last field
.. All the fields

EXTENDED SEARCH MODE
Unless specified otherwise, fzf will start in "extended-search mode". In this mode, you can specify multiple patterns delimited by spaces, such as: 'wild ^music .mp3$ sbtrkt !rmx

  Exact-match (quoted)
A term that is prefixed by a single-quote character (') is interpreted as an "exact-match" (or "non-fuzzy") term. fzf will search for the exact occurrences of the string.

  Anchored-match
A term can be prefixed by ^, or suffixed by $ to become an anchored-match term. Then fzf will search for the items that start with or end with the given string. An anchored-match term is also an exact-match term.

  Negation
If a term is prefixed by !, fzf will exclude the items that satisfy the term from the result.

  Exact-match by default
If you don't prefer fuzzy matching and do not wish to "quote" (prefixing with ') every word, start fzf with -e or --exact option. Note that when --exact is set, '-prefix "unquotes" the term.

  OR operator
A single bar character term acts as an OR operator. For example, the following query matches entries that start with core and end with either go, rb, or py. e.g. ^core go$ | rb$ | py$

AUTHOR
Junegunn Choi (junegunn.c@gmail.com)

SEE ALSO
Project homepage:
    https://github.com/junegunn/fzf
Extra Vim plugin:
    https://github.com/junegunn/fzf.vim

LICENSE
MIT