function pbcopy -d "Copy data from STDIN to the clipboard" if type -q xclip command xclip -selection clipboard else if type -q xsel command xsel --clipboard --input else command echo "ERROR: xclip or xsel not found" end end