mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Bind Shift+Return CSI u sequence to Return
I often hit Shift-Return accidentally, which makes my terminal echo a
weird escape sequence. Traditionally, terminals interpret Shift-Return
as Return, so let's follow that behavior. Analoguous to commit 1dc526884
(Bind Shift+Space CSI u sequence to Space, 2022-04-24).
This commit is contained in:
parent
27739b9a47
commit
9c0680070d
1 changed files with 4 additions and 1 deletions
|
@ -192,9 +192,12 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod
|
|||
|
||||
bind --preset $argv \n execute
|
||||
bind --preset $argv \r execute
|
||||
# Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion.
|
||||
# Make Control+Return behave like Return because it's easy to mistype after accepting an autosuggestion.
|
||||
bind --preset $argv \e\[27\;5\;13~ execute # Sent with XTerm.vt100.formatOtherKeys: 0
|
||||
bind --preset $argv \e\[13\;5u execute # CSI u sequence, sent with XTerm.vt100.formatOtherKeys: 1
|
||||
# Same for Shift+Return
|
||||
bind --preset $argv \e\[27\;2\;13~ execute
|
||||
bind --preset $argv \e\[13\;2u execute
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue