LinuxCommandLibrary

choose

Select items from a list interactively

TLDR

Print the 5th item from a line (starting from 0)

$ choose [4]
copy

Print the first, 3rd, and 5th item from a line, where items are separated by ':' instead of whitespace
$ choose [[-f|--field-separator]] '[:]' [0] [2] [4]
copy

Print everything from the 2nd to 5th item on the line, including the 5th
$ choose [1]:[4]
copy

Print everything from the 2nd to 5th item on the line, excluding the 5th
$ choose [[-x|--exclusive]] [1]:[4]
copy

Print the beginning of the line to the 3rd item
$ choose :[2]
copy

Print all items from the beginning of the line until the 3rd item (exclusive)
$ choose [[-x|--exclusive]] :[2]
copy

Print all items from the 3rd to the end of the line
$ choose [2]:
copy

Print the last item from a line
$ choose [-1]
copy

SYNOPSIS

choose [OPTION...] < input

PARAMETERS

--prompt
    Custom prompt prefix

--header
    Treat first N lines as non-selectable header

--preview
    Command to generate preview pane content

--height
    Maximum height of selector (default: 10)

--inline
    Inline mode: single-line selector

--multi
    Enable multi-select with Tab

--case
    Case-sensitive matching

--exact
    Exact substring matching instead of fuzzy

--fuzzy
    Enable fuzzy matching (default)

-h, --help
    Show help

DESCRIPTION

Choose is a fast, terminal-based fuzzy finder written in Rust. It reads lines from standard input, displays them in a scrollable list, and allows interactive selection via fuzzy matching as you type. Press Enter to select, Ctrl+C to cancel. Supports multi-select, previews, custom prompts, and height adjustment.

Ideal for selecting from command outputs like files (find, ls), processes (ps), or git branches. Filters update in real-time with case-insensitive matching by default. Outputs selected lines to stdout, enabling piping into other commands.

Unlike full-screen tools like fzf, choose uses a compact inline or fixed-height mode, making it lightweight for scripts and quick picks. Install via cargo: cargo install choose-cli.

CAVEATS

Not a standard utility; install from crates.io. Performance best with <10k lines. No mouse support.

EXAMPLE

ls *.txt | choose — interactively pick text files.
ps aux | choose --header 1 --preview 'cat /proc/{}/cmdline' — select processes with preview.

HISTORY

Developed by Skyler Grey; first release April 2021. Actively maintained on GitHub with Rust for speed.

SEE ALSO

fzf(1), sk(1), pick(1)

Copied to clipboard