FISH\_CLIPBOARD\_COPY(1) fish-shell FISH\_CLIPBOARD\_COPY(1)

# [NAME](#NAME)

fish\_clipboard\_copy - copy text to the system's clipboard

# [SYNOPSIS](#SYNOPSIS)

```
fish_clipboard_copy
foo | fish_clipboard_copy
```

# [DESCRIPTION](#DESCRIPTION)

The **fish\_clipboard\_copy** function copies text to the system clipboard.

If stdin is not a terminal (see isatty &lt;&gt;), 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 &lt;#term-compat-osc-52&gt;, which your terminal might support

# [SEE ALSO](#SEE_ALSO)

•

fish\_clipboard\_paste - get text from the system's clipboard &lt;&gt; which does the inverse.

# [Copyright](#Copyright)

fish-shell developers

October 26, 2026 4.9

---

Document: fish_clipboard_copy(1) from fish 4.9.3-r4 (Chainguard OS)
Source: https://github.com/fish-shell/fish-shell
