XClip in Fish Shell

Wondered if you could just copy the output of a bash command to clipboard and paste it somewhere.

XClip is here for your rescue. The Fish Shell 3.0 now supports xclip.

How to use :

  • For copying
    • $pwd | xclip
  • Paste it
    • $cd (xclip -o)

PS: In fish to execute a string as a command use paranthesis "( )" instead of backticks " ` ` “. Just add alias in the fish config :

alias c "xclip"
alias v "xclip -o"

For bash the

alias "c=xclip"
alias "v=xclip -o"
comments powered by Disqus