mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Add ctrl-alt-h compatibility binding
Historically, ctrl-i sends the same code as tab, ctrl-h sends backspace and ctrl-j and ctrl-m behave like enter. Even for terminals that send unambiguous encodings (via the kitty keyboard protocol), we have kept bindings like ctrl-h, to support existing habits. We forgot that pressing alt-ctrl-h would behave like alt-backspace (and can be easier to reach) so maybe we should add that as well. Don't add ctrl-shift-i because at least on Linux, that's usually intercepted by the terminal emulator. Technically there are some more such as "ctrl-2" (which used to do the same as "ctrl-space") but I don't think anyone uses that over "ctrl-space". Closes #https://github.com/fish-shell/fish-shell/discussions/11548
This commit is contained in:
@@ -52,11 +52,13 @@ function fish_default_key_bindings -d "emacs-like key binds"
|
||||
bind --preset $argv alt-c capitalize-word
|
||||
if test (__fish_uname) = Darwin
|
||||
bind --preset $argv alt-backspace backward-kill-word
|
||||
bind --preset $argv ctrl-alt-h backward-kill-word
|
||||
bind --preset $argv ctrl-backspace backward-kill-token
|
||||
bind --preset $argv alt-delete kill-word
|
||||
bind --preset $argv ctrl-delete kill-token
|
||||
else
|
||||
bind --preset $argv alt-backspace backward-kill-token
|
||||
bind --preset $argv ctrl-alt-h backward-kill-token
|
||||
bind --preset $argv ctrl-backspace backward-kill-word
|
||||
bind --preset $argv alt-delete kill-token
|
||||
bind --preset $argv ctrl-delete kill-word
|
||||
|
||||
Reference in New Issue
Block a user