| FISH_CLIPBOARD_COPY(1) | fish-shell | FISH_CLIPBOARD_COPY(1) |
NAME
fish_clipboard_copy - copy text to the system's clipboard
SYNOPSIS
fish_clipboard_copy foo | fish_clipboard_copy
DESCRIPTION
The fish_clipboard_copy function copies text to the system clipboard.
If stdin is not a terminal (see isatty <>), it will read all input from there and copy it. If it is, it will use the current commandline, or the current selection if there is one.
It is bound to ctrl-x by default.
fish_clipboard_copy works by calling a system-specific backend. If it doesn't appear to work you may need to install yours.
Currently supported are:
- pbcopy
- wl-copy using wayland
- xsel and xclip for X11
- clip.exe on Windows.
- The OSC 52 clipboard sequence <#term-compat-osc-52>, which your terminal might support
SEE ALSO
- •
- fish_clipboard_paste - get text from the system's clipboard <> which does the inverse.
Copyright
fish-shell developers
| October 15, 2026 | 4.9 |