mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 23:21:15 -03:00
Silence bind errors in default key bindings
This silences binding errors due to keys not found in the current termcap config in the default fish bindings. Closes #4188, #4431, and obviates the original fix for #1155 It was necessary to re-implement builtin_bind as a class in order to avoid passing around the options array from function to function and as adding an opts parameter to `get_terminfo_sequence` would require otps to be passed to all other builtin_bind_ functions so they could, in turn, pass it to `get_terminfo_sequence`.
This commit is contained in:
@@ -18,6 +18,11 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
||||
end
|
||||
end
|
||||
|
||||
# Silence warnings about unavailable keys. See #4431, 4188
|
||||
if not contains -- -s $argv
|
||||
set argv "-s" $argv
|
||||
end
|
||||
|
||||
# These are shell-specific bindings that we share with vi mode.
|
||||
__fish_shared_key_bindings $argv
|
||||
or return # protect against invalid $argv
|
||||
|
||||
Reference in New Issue
Block a user