Skip to content

FZF Tab Completions

Jethro Kuan edited this page Dec 26, 2019 · 2 revisions

This package ships with a fzf widget for fancy tab completions.

To enable it, the FZF_COMPLETE variable must be set to 0, 1, 2, or 3. To disable it, unset the variable with set -e FZF_COMPLETE.

NOTE: This widget does not work with completions that need to be escaped (e.g. directories/files with spaces). Use at your own risk!

Here are some screenshots of each option in action:

$FZF_COMPLETE = 0

Basic widget that accepts with TAB key. To enable, run set -U FZF_COMPLETE 0.

FZF_COMPLETE = 0

$FZF_COMPLETE = 1, 2, 3

These extend the basic widget to add a candidate preview window with minor differences:

  • 1 is a basic extension.
  • 2 allows walking candidates with TAB
  • 3 uses TAB for multi-selection, and RETURN to accept the selections

FZF_COMPLETE = 1 or 2 or 3

Clone this wiki locally