fzf

Table of Contents

1. Key bindings

  • CTRL-T : Paste the selected files and directories onto the command-line
  • CTRL-R : Paste the selected command from history onto the command-line
  • ALT-C : cd into the selected directory

2. Usage

2.1. Preview REPL

# echo '' : we get empty slate
# --print-query : So that we get the command in the end
# {q} : puts in the whole query
# So basically this allows us to prototype w:
# echo "a\nb\nc\nd" | awk {q}
echo '' | fzf --print-query --preview 'echo "a\nb\nc\nd" | awk {q}'

3. Search syntax

Token Match type Description
sbtrkt fuzzy-match Items that match `sbtrkt`
'wild exact-match (quoted) Items that include `wild`
^music prefix-exact-match Items that start with `music`
.mp3$ suffix-exact-match Items that end with `.mp3`
!fire inverse-exact-match Items that do not include `fire`
!^music inverse-prefix-exact-match Items that do not start with `music`
!.mp3$ inverse-suffix-exact-match Items that do not end with `.mp3`

Created: 2024-07-16 Tue 16:44

Validate