IFS
Determines the separator used between choices and descriptions.
Fuzzy select anything
pick [-hvKS]
[-d
[-o]]
[{-x | -X}]
[-q
query]
The pick utility allows users to select from a set of choices using an curses(3) interface with fuzzy search functionality.
The choices are read from stdin, and the selected choice written to stdout.
The options are as follows:
-d
Read and display descriptions. Input lines will be split into two parts by the last occurrence of IFS. Both parts will be displayed but only the first part will be used when searching.
-h
Output a help message and exit.
-K
Disable toggling of keypad transmit mode. Useful when running pick from within another interactive program which already has set the correct transmit mode.
-o
Output description of selected choice on exit.
-q query
Supply an initial search query.
-S
Disable sorting. Only filter the choices instead of additionally sorting by score. This option can be toggled from within the interface, see COMMANDS.
-v
Output the version and exit.
-x
Enable the use of the alternate screen terminal feature. This is the default.
-X
Disable the use of the alternate screen terminal feature.
Ctrl-CExit with a erroneous status without outputting the selected choice. While this command often being defined as Ctrl-C it is determined by the VINTR control character, see termios(4).
Ctrl-LRedraw interface with respect to the current size of the terminal.
Ctrl-OToggle sorting.
Up/Down | Ctrl-P/Ctrl-NSelect between choices matching the current search query.
Page-Down/Page-Up | Ctrl-V/Alt-V | Alt-SpaceMove the selection to the choice located one page down/up from the currently selected choice.
Home/End | Alt-</Alt->Move the selection to the first/last choice matching the current search query.
EnterOutput the currently selected choice and exit.
Alt-EnterOutput the current input query and exit.
Left/Right | Ctrl-B/Ctrl-FMove the cursor left and right in the search query input field.
Ctrl-AMove the cursor to the beginning of the line in the search query input field.
Ctrl-EMove the cursor to the end of the line in the search query input field.
Backspace | Ctrl-HDelete one character to the left of the cursor in the search query input field.
Delete | Ctrl-DDelete the character under the cursor in the search query input field.
Ctrl-W | Alt-BackspaceDelete the word to the left of the cursor. A word is recognized as a sequence of characters for which either isalnum(3) is true or the character is an underscore.
Ctrl-UDelete to the beginning of the line in the search query input field.
Ctrl-KDelete to the end of the line in the search query input field.
Printable charactersAdded to the search query and will refine the current search.
The following environment variables will affect the execution of pick:
IFS
Determines the separator used between choices and descriptions.
The screen is resized.
Select a file in the current directory to open using xdg-open(1):
$ find . -type f | pick | xargs xdg-open
Select a command from the history to execute:
$ eval $(fc -ln 1 | pick)
The pick utility exits 0 on success, and >0 if an error occurs.
15 releases since Debian 1.1 (Buzz); the text changed 10 times.
-K since Debian 10 (Buster);
-S since Debian 10 (Buster);
-X since Debian 9 (Stretch);
-d since Debian 9 (Stretch);
-h since Debian 9 (Stretch);
-o since Debian 9 (Stretch);
-q since Debian 9 (Stretch);
-v since Debian 9 (Stretch);
-x since Debian 9 (Stretch).