2022-10-19 20:05:10 +02:00
.. _cmd-fish_clipboard_copy:
fish_clipboard_copy - copy text to the system's clipboard
==============================================================
Synopsis
--------
.. 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 :doc: `isatty <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.
2024-04-13 20:30:07 +02:00
It is bound to :kbd: `ctrl-x` by default.
2022-10-19 20:05:10 +02:00
`` 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.
2025-02-08 12:17:55 +01:00
- The OSC 52 clipboard sequence, which your terminal might support
2022-10-19 20:05:10 +02:00
See also
--------
- :doc: `fish_clipboard_paste` which does the inverse.