VIS-CLIPBOARD(1) | General Commands Manual | VIS-CLIPBOARD(1) |
vis-clipboard
—
Read from or write to the system clipboard
vis-clipboard |
--usable |
vis-clipboard |
--copy [--selection
selection] |
vis-clipboard |
--paste [--selection
selection] |
vis-clipboard
wraps various
system-specific tools for interacting with a system clipboard, like
xsel(1) for X11,
pbcopy(1) for Mac OS X, and
/dev/clipboard on Cygwin.
vis-clipboard
can run in three different
ways, depending on the flag given on the command-line.
--usable
vis-clipboard
looks for a way to
interface with the system clipboard. If it finds one, it terminates with
exit code 0. If no interface to the system clipboard is available, it
terminates with exit code 1.--copy
vis-clipboard
reads the content of
standard input, and stores it in the system clipboard.--paste
vis-clipboard
reads the content of
the system clipboard, and writes it to standard output.--selection
selectionThe following environment variables affect the operation of
vis-clipboard
:
DISPLAY
vis-clipboard
will prefer to access
the X11 clipboard even if other options are available.The vis-clipboard
utility exits 0
on success, and >0 if an error occurs. When run with the
--usable
flag, an exit status of 0 means that it
found a supported system-specific tool, while 1 means that clipboard access
is not available.
Test whether clipboard access is available:
if vis-clipboard --usable; then echo "Clipboard access available" else echo "No clipboard" fi
Copy a friendly greeting to the clipboard:
echo "Hello, World" | vis-clipboard --copy
Send the current contents of the system clipboard to be recorded and analyzed:
vis-clipboard --paste | curl -d - https://www.nsa.gov/
November 29, 2016 | Vis 0.9 |