mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 11:43:37 +08:00
2fd15e7c6c
Fixes #4923. [ci skip]
10 lines
256 B
Fish
10 lines
256 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
|
|
end
|
|
end
|