mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 14:23:09 +00:00
422ff0f173
This silences a rather verbose error.
12 lines
454 B
Fish
12 lines
454 B
Fish
function fish_clipboard_paste
|
|
if type -q pbpaste
|
|
commandline -i -- (pbpaste)
|
|
else if type -q xsel
|
|
# Only run `commandline` if `xsel` succeeded.
|
|
# That way any xsel error is printed (to show e.g. a non-functioning X connection),
|
|
# but we don't print the redundant (and overly verbose for this) commandline error.
|
|
if set -l data (xsel --clipboard)
|
|
commandline -i -- $data
|
|
end
|
|
end
|
|
end
|