mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-25 20:41:15 -03:00
No need to define "cmd-foo" anchors; use :doc:`foo <cmds/foo>`
instead. If we want "cmd-foo" but it should be tested.
See also 38b24c2325 (docs: Use :doc: role when linking to commands,
2022-09-23).
36 lines
973 B
ReStructuredText
36 lines
973 B
ReStructuredText
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.
|
|
|
|
It is bound to :kbd:`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 :ref:`OSC 52 clipboard sequence <term-compat-osc-52>`, which your terminal might support
|
|
|
|
See also
|
|
--------
|
|
|
|
- :doc:`fish_clipboard_paste` which does the inverse.
|