mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-01 10:11:14 -03:00
Don't paste if xsel fails
This silences a rather verbose error.
This commit is contained in:
@@ -2,6 +2,11 @@ function fish_clipboard_paste
|
||||
if type -q pbpaste
|
||||
commandline -i -- (pbpaste)
|
||||
else if type -q xsel
|
||||
commandline -i -- (xsel --clipboard)
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user