Scroll to navigation

PICK(1) General Commands Manual PICK(1)

NAME

pick
fuzzy select anything

SYNOPSIS

pick [-hvKS] [-d [-o]] [-x | -X] [-q query]

DESCRIPTION

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:

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.
Output a help message and exit.
Disable toggling of keypad transmit mode. Useful when running pick from within another interactive program which already has set the correct transmit mode.
Output description of selected choice on exit.
query
Supply an initial search query.
Disable sorting. Only filter the choices instead of additionally sorting by score. This option can be toggled from within the interface, see COMMANDS.
Output the version and exit.
Enable the use of the alternate screen terminal feature. This is the default.
Disable the use of the alternate screen terminal feature.

COMMANDS

Exit 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).
Redraw interface with respect to the current size of the terminal.
Toggle sorting.
/Down | /Ctrl-N
Select between choices matching the current search query.
/Page-Up | /Alt-V |
Move the selection to the choice located one page down/up from the currently selected choice.
/End | /Alt->
Move the selection to the first/last choice matching the current search query.
Output the currently selected choice and exit.
Output the current input query and exit.
/Right | /Ctrl-F
Move the cursor left and right in the search query input field.
Move the cursor to the beginning of the line in the search query input field.
Move the cursor to the end of the line in the search query input field.
|
Delete one character to the left of the cursor in the search query input field.
|
Delete the character under the cursor in the search query input field.
|
Delete 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.
Delete to the beginning of the line in the search query input field.
Delete to the end of the line in the search query input field.
Added to the search query and will refine the current search.

ENVIRONMENT

The following environment variables will affect the execution of pick:
Determines the separator used between choices and descriptions.

ASYNCHRONOUS EVENTS

The screen is resized.

EXAMPLES

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)

DIAGNOSTICS

The pick utility exits 0 on success, and >0 if an error occurs.

HISTORY

The first version of pick was released on August 18, 2014. Development was sponsored by thoughtbot from the start of the project until September 2016.

AUTHORS

Calle Erlandsson <calle@calleerlandsson.com>
Anton Lindqvist <anton.lindqvist@gmail.com>
August 17, 2014 Linux 4.19.0-10-amd64