fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

fzy.1

(2445B)


      1 .TH FZY 1 "2025-07-12" "fzy 1.1"
      2 .SH NAME
      3 fzy \- A fuzzy text selector menu for the terminal.
      4 .SH SYNOPSIS
      5 .B fzy
      6 .IR [OPTION]...
      7 .SH DESCRIPTION
      8 .B fzy is a fuzzy text selector/file finder for the terminal using a search
      9 similar to that of TextMate or CmdT.
     10 
     11 fzy reads a list of newline-separated items from stdin to be displayed as a
     12 menu in the terminal.
     13 Upon pressing ENTER, the currently selected item is printed to stdout.
     14 
     15 Entering text narrows the items using fuzzy matching. Results are sorted using
     16 heuristics for the best match.
     17 
     18 .SH OPTIONS
     19 .TP
     20 .BR \-l ", " \-\-lines =\fILINES\fR
     21 How many lines of items to display. If unspecified, defaults to 10 lines.
     22 .
     23 .TP
     24 .BR \-p ", " \-\-prompt =\fIPROMPT\fR
     25 Input prompt (default: '> ')
     26 .
     27 .TP
     28 .BR \-s ", " \-\-show-scores
     29 Show the scores for each item.
     30 .
     31 .TP
     32 .BR \-t ", " \-\-tty =\fITTY\fR
     33 Use TTY instead of the default tty device (/dev/tty).
     34 .
     35 .TP
     36 .BR \-q ", " \-\-query =\fIQUERY\fR
     37 Use QUERY as the initial search query.
     38 .
     39 .TP
     40 .BR \-e ", " \-\-show-matches =\fIQUERY\fR
     41 Non-interactive mode. Print the matches in sorted order for QUERY to stdout.
     42 .
     43 .TP
     44 .BR \-0 ", " \-\-read-null
     45 Read input delimited by ASCII NUL characters.
     46 .
     47 .TP
     48 .BR \-i ", " \-\-show-info
     49 Show selection info line.
     50 .
     51 .TP
     52 .BR \-h ", " \-\-help
     53 Usage help.
     54 .
     55 .TP
     56 .BR \-v ", " \-\-version
     57 Usage help.
     58 .
     59 .SH KEYS
     60 .
     61 .TP
     62 .BR "ENTER"
     63 Print the selected item to stdout and exit
     64 .TP
     65 .BR "Ctrl+c, Ctrl+g, Esc"
     66 Exit with status 1, without making a selection.
     67 .TP
     68 .BR "Up Arrow, Ctrl+p, Ctrl+k"
     69 Select the previous item
     70 .TP
     71 .BR "Down Arrow, Ctrl+n, Ctrl+j"
     72 Select the next item
     73 .TP
     74 Tab
     75 Replace the current search string with the selected item
     76 .TP
     77 .BR "Backspace, Ctrl+h"
     78 Delete the character before the cursor
     79 .TP
     80 .BR Ctrl+w
     81 Delete the word before the cursor
     82 .TP
     83 .BR Ctrl+u
     84 Delete the entire line
     85 .
     86 .SH USAGE EXAMPLES
     87 .
     88 .TP
     89 .BR "ls | fzy"
     90 Present a menu of items in the current directory
     91 .TP
     92 .BR "ls | fzy -l 25"
     93 Same as above, but show 25 lines of items
     94 .TP
     95 .BR "vi $(find -type f | fzy)"
     96 List files under the current directory and open the one selected in vi.
     97 .TP
     98 .BR "cd $(find -type d | fzy)"
     99 Present all directories under current path, and change to the one selected.
    100 .TP
    101 .BR "ps aux | fzy | awk '{ print $2 }' | xargs kill"
    102 List running processes, kill the selected process
    103 .TP
    104 .BR "git checkout $(git branch | cut -c 3- | fzy)"
    105 Same as above, but switching git branches.
    106 .SH AUTHOR
    107 John Hawthorn <john.hawthorn@gmail.com>