mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
11 lines
343 B
Fish
11 lines
343 B
Fish
function fish_clipboard_copy
|
|
if type -q pbcopy
|
|
commandline | pbcopy
|
|
else if type -q xsel
|
|
# Silence error so no error message shows up
|
|
# if e.g. X isn't running.
|
|
commandline | xsel --clipboard 2>/dev/null
|
|
else if type -q xclip
|
|
commandline | xclip -selection clipboard 2>/dev/null
|
|
end
|
|
end
|