|
NAMEyank —
yank terminal output to clipboard
SYNOPSIS
DESCRIPTIONRead input from stdin and display a selection interface that allows a field to be selected and copied to the clipboard. Fields are either recognized by a regular expression using the-g
option or by splitting the input on a delimiter sequence using the
-d option, see
DELIMITERS.
Using the arrow keys will move the selected field, see COMMANDS. Pressing the return key will invoke command and write the selected field to its stdin. The command defaults to xsel(1x) but could be anything that accepts input on stdin, see EXAMPLES. The options are as follows:
COMMANDS
DELIMITERSIf the-d and -g options are
omitted the following characters are recognized as delimiters by default:
If the EXAMPLESYank an environment variable key or value:$ env | yank -d = Yank a field from a CSV file: $ yank -d \",
<file.csv Yank a whole line using the $ make 2>&1 | yank
-l If stdout is not a terminal the selected field will be written to stdout and exit without invoking the yank command. Kill the selected PID: $ ps ux | yank -g [0-9]+ | xargs
kill Yank the selected field to the clipboard as opposed of the default primary clipboard: $ yank -- xsel -b DIAGNOSTICSTheyank utility exits 0 on success,
and >0 if an error occurs.
SEE ALSOre_format(7)AUTHORSAnton Lindqvist <anton@basename.se>CAVEATSRecognizing fields enclosed in brackets requires ‘]’ to be present before ‘[’ in the argument given to the-d option, see
re_format(7).
Visit the GSP FreeBSD Man Page Interface. |