LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pick

Fuzzy interactive selector for stdin lines

TLDR

Pick a file and open it
$ find . -type f | pick | xargs xdg-open
copy
Re-run a command from shell history
$ eval $(fc -ln 1 | pick)
copy
Select one line from a list
$ printf '%s\n' [a b c] | pick
copy

SYNOPSIS

pick

DESCRIPTION

pick reads newline-separated choices from standard input, presents an interactive fuzzy filter in the terminal, and writes the selected line to standard output. It is designed for shell pipelines and subshells: feed it any list, choose an entry with the keyboard, and pipe the result into another command.A Vim plugin (pick.vim) and packages for many Linux distributions and BSDs are available. Homepage: https://www.basename.se/pick/

PARAMETERS

pick typically takes no arguments; configuration is via terminal interaction (typing to filter, arrow keys / completion to select, Enter to confirm). See the installed man page pick(1) for key bindings and compile-time options.

INSTALL

sudo apt install pick
copy
sudo dnf install pick
copy
sudo apk add mmh
copy
brew install pick
copy
nix profile install nixpkgs#pick
copy

CAVEATS

Requires a TTY for interactive use; pure non-interactive pipelines without a terminal will not work. Output is a single selected line (behavior if cancelled depends on version—check exit status in scripts).

SEE ALSO

fzf(1), fzy(1), peco(1), selecta(1)

RESOURCES

Copied to clipboard
Kai