VibeHunt
Back to browse
yank

yank

Yank terminal output to clipboard.

Source

The utility reads data from standard input and presents an interactive selector that lets the user choose a field to copy to the clipboard. Fields can be identified either by a regular‑expression pattern (using ‑g) or by splitting on a delimiter (using ‑d). Navigation is done with arrow keys and supports Emacs‑ and Vi‑style bindings; pressing Return invokes a yank command that writes the selected text to the clipboard. By default the command is xsel, but any program that reads from stdin can be specified after --, and the selected field can be sent to stdout when the output is not a terminal.

Typical use cases include extracting a value from environment‑variable listings, copying a column from CSV data, or selecting a line from build output. The tool can also be chained with other commands, for example to feed a PID to xargs kill. An option ‑l copies an entire line, and the default clipboard target can be changed (e.g., to pbcopy on macOS or shcopy for SSH sessions).

The program is available as a stable command‑line package for many Linux distributions, macOS, and BSD systems, and can be built from source. Installation places the binary as yank‑cli to avoid naming conflicts, and the default yank command can be overridden via the YANKCMD environment variable. The project is released under the MIT license.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps