mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Add support for wayland copy/paste
This commit is contained in:
parent
7191a42ca0
commit
41b3331175
3 changed files with 5 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
||||||
- Added completions for:
|
- Added completions for:
|
||||||
- nothing yet...
|
- nothing yet...
|
||||||
- Lots of improvements to completions.
|
- Lots of improvements to completions.
|
||||||
|
- fish_clipboard_* now supports wayland by means of [wl-clipboard](https://github.com/bugaevc/wl-clipboard).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -10,5 +10,7 @@ function fish_clipboard_copy
|
||||||
printf '%s\n' $cmdline | xsel --clipboard 2>/dev/null
|
printf '%s\n' $cmdline | xsel --clipboard 2>/dev/null
|
||||||
else if type -q xclip
|
else if type -q xclip
|
||||||
printf '%s\n' $cmdline | xclip -selection clipboard 2>/dev/null
|
printf '%s\n' $cmdline | xclip -selection clipboard 2>/dev/null
|
||||||
|
else if type -q wl-copy
|
||||||
|
printf '%s\n' $cmdline | wl-copy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,6 +13,8 @@ function fish_clipboard_paste
|
||||||
if not set data (xclip -selection clipboard -o 2>/dev/null)
|
if not set data (xclip -selection clipboard -o 2>/dev/null)
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
else if type -q wl-paste
|
||||||
|
set data (wl-paste)
|
||||||
end
|
end
|
||||||
# Also split on \r to turn it into a newline,
|
# Also split on \r to turn it into a newline,
|
||||||
# otherwise the output looks really confusing.
|
# otherwise the output looks really confusing.
|
||||||
|
|
Loading…
Reference in a new issue