mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
Redirect stderr of xclip to /dev/null
xclip will display an error when pasting if the clipboard contains something that isn't text: Error: target STRING not available Swallow this error.
This commit is contained in:
parent
1d1bee3ba2
commit
077f1f2576
|
@ -7,7 +7,7 @@ function fish_clipboard_paste
|
|||
else if set -q DISPLAY; and type -q xsel
|
||||
set data (xsel --clipboard)
|
||||
else if set -q DISPLAY; and type -q xclip
|
||||
set data (xclip -selection clipboard -o)
|
||||
set data (xclip -selection clipboard -o 2>/dev/null)
|
||||
else if type -q powershell.exe
|
||||
set data (powershell.exe Get-Clipboard | string trim -r -c \r)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user