Need help with
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

482 Stars 29 Forks MIT License 164 Commits 3 Opened issues


Augment your fish command line with fzf key bindings.

Services available


Need anything else?

Contributors list

Augment your Fish command line with mnemonic key bindings to efficiently find what you need using fzf.


to interactively find and insert different shell entities into the command line:

File paths

gif directory

  • Search input: recursive listing of current directory's non-hidden files
  • Key binding and mnemonic: Ctrl+Alt+F (
    for file)
  • Preview window: file with syntax highlighting, directory contents, or file type
  • Remarks
    • appends
      if the selection is a directory and the only path selected so you can hit ENTER to immediately cd into it
    • if the current token is a directory with a trailing slash (e.g.
      ), then that directory is searched instead
    • ignores files that are also ignored by git
    • Tab to multi-select

Modified paths

gif git status

  • Search input: the current repository's
    git status
  • Key binding and mnemonic: Ctrl+Alt+S (
    for status)
  • Remarks: Tab to multi-select

A commit hash

gif git log

  • Search input: the current repository's formatted
    git log
  • Key binding and mnemonic: Ctrl+Alt+L (
    for log)
  • Preview window: commit message and diff

A previously run command

gif command history

  • Search input: Fish's command history
  • Key binding and mnemonic: Ctrl+R (
    for reverse-i-search)
  • Preview window: the entire command with Fish syntax highlighting

A shell variable

gif shell variables

  • Search input: all the variable names of the environment currently in scope
  • Key binding and mnemonic: Ctrl+V (
    for variable)
  • Preview window: the scope info and values of the variable
  • Remarks
    • $history
      is excluded for technical reasons so use the search command history feature instead to inspect it

The prompt used in the screencasts was created using IlanCosman/tide.


First, install a proper version of these CLI dependencies:

| CLI | Minimum version required | Description | | -------- | ------------------------ | ---------------------------------------------- | | fish | 3.2.0 | a modern shell | | fzf | 0.27.2 | fuzzy finder that powers this plugin | | fd | 7.5.0 | faster and more colorful alternative to

| | bat | 0.16.0 | smarter
with syntax highlighting |

The search directory feature uses fd and bat to list and preview files. If you don't plan on using search directory, then you don't need to install them.

Next, install this plugin with Fisher.
can be installed manually or with other plugin managers but only Fisher is officially supported.
fisher install PatrickF1/


Customize key bindings
includes a convenient wrapper for configuring its key bindings. It comes with command completions and is thoroughly documented. See
fzf_configure_bindings --help

Once you've found the

command that produces the desired bindings, add it to your
in order to persist the bindings.

Always pass some options to fzf

fzf supports setting default options via the FZFDEFAULTOPTS environment variable. If it is set, fzf implicitly prepends it to the options passed to it on every execution, scripted and interactive.

By default,
will set a sane
every time before it executes fzf. However, if you export your own
variable, then
will forgo setting it and yours will be used instead. See functions/ for more details.

Pass fzf options for a specific feature

The following variables can store custom options that will be passed to fzf by their respective feature:

| Feature | Variable | | ---------------------- | --------------------- | | Search directory |

| | Search git status |
| | Search git log |
| | Search command history |
| | Search shell variables |

They are always appended last to fzf's argument list. Because fzf uses the option appearing last when options conflict, your custom options can override hardcoded options. Custom fzf options unlocks a variety of possibilities in customizing and augmenting each feature such as:

Change the command used to preview files

The search directory feature, by default, uses

to preview the contents of files.
is a well-adopted
replacement with syntax highlighting, line numbers, and more. If you would like to change the preview tool (to
to avoid installing a new dependency, or to add custom logic such as binary or image preview), you may set the
variable. For example, in your
, you may put:
set fzf_preview_file_cmd cat

Do not specify a target path in the command, as
will prepend the file to preview to the command itself.

Change the command used to preview directories

The search directory feature, by default, uses

to preview the contents of directories. To integrate with the variety of
replacements available (e.g. exa, lsd, tree), the command used to preview directories is configurable through the
variable. Set
in your
set fzf_preview_dir_cmd exa --all --color=always

As above, do not specify a target path in the command.
will prepend the directory to preview to the command itself.

Change the files searched

To pass custom options to

when it is executed to populate the list of files for the search directory feature, set the
variable. For example, to include hidden files but not
, put this in your
set fzf_fd_opts --hidden --exclude=.git

Further reading

Find answers to these questions and more in the project Wiki:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.