FISH_CLIPBOARD_COPY(1)

✨ NAME ✨

fish_clipboard_copy β€” copy text to the system's clipboard, bestie, that's literally it πŸ’…

(this is a page from the fish-shell manual, section 1, and it's about to be your new fave 🫢)


🌸 SYNOPSIS 🌸

fish_clipboard_copy
foo | fish_clipboard_copy

πŸ’– DESCRIPTION πŸ’–

okay so. the fish_clipboard_copy function copies text to the system clipboard. iconic behavior, no notes ✨

if stdin is not a terminal (see isatty), it will read all the input from there and copy it. if it is a terminal, it will use the current commandline instead β€” or the current selection, if there is one πŸŽ€

it's bound to Ctrl+X by default. iykyk 😌

how does it actually do it? fish_clipboard_copy works by calling a system-specific backend. so if it doesn't appear to work for you, ngl, you may need to install yours πŸ™ˆ

currently supported backends are:

  • pbcopy
  • wl-copy using wayland
  • xsel and xclip for X11
  • clip.exe on Windows
  • the OSC 52 clipboard sequence, which your terminal might support πŸ‘‘
lowkey important: that last one is the terminal thing β€” it only works if your terminal supports it, so no cap, don't come for me if yours doesn't πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • fish_clipboard_paste β€” get text from the system's clipboard, which does the exact inverse πŸ”

fish-shell developers πŸ‘‘


and that's a wrap, bestie πŸŽ€ this was the fish-shell manual, fish_clipboard_copy(1), version 4.9, dated Sep 08, 2026 β€” go forth and copy things βœ¨πŸ’–πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms