Vi-bindings: Use fish_clipboard_copy

This has one slight behavioral change: Even with xsel, it now copies
to the clipboard, not the primary. I would imagine anyone who cares
about the primary selection has customized fish_clipboard_copy and
because we never got a bug about this not supporting anything but
xsel (and errorring out if it's not available!) this is probably
unused.

So now we support all the clipboard integration things, and we use the clipboard.
This commit is contained in:
Fabian Homborg 2021-06-03 10:04:30 +02:00
parent c18c7a4ce4
commit 4e718506e3

View file

@ -307,7 +307,7 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
bind -s --preset -M visual -m default x kill-selection end-selection repaint-mode bind -s --preset -M visual -m default x kill-selection end-selection repaint-mode
bind -s --preset -M visual -m default X kill-whole-line end-selection repaint-mode bind -s --preset -M visual -m default X kill-whole-line end-selection repaint-mode
bind -s --preset -M visual -m default y kill-selection yank end-selection repaint-mode bind -s --preset -M visual -m default y kill-selection yank end-selection repaint-mode
bind -s --preset -M visual -m default '"*y' "commandline -s | xsel -p; commandline -f end-selection repaint-mode" bind -s --preset -M visual -m default '"*y' "fish_clipboard_copy; commandline -f end-selection repaint-mode"
bind -s --preset -M visual -m default '~' togglecase-selection end-selection repaint-mode bind -s --preset -M visual -m default '~' togglecase-selection end-selection repaint-mode
bind -s --preset -M visual -m default \cc end-selection repaint-mode bind -s --preset -M visual -m default \cc end-selection repaint-mode