mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-04 09:13:39 +08:00
12 lines
343 B
Fish
12 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
|