mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Give up earlier when we can't find default key bindings.
This relates to #3302.
This commit is contained in:
parent
386c698d45
commit
790968120d
1 changed files with 8 additions and 1 deletions
|
@ -172,11 +172,18 @@ function __fish_config_interactive -d "Initializations that should be performed
|
||||||
if set -q __fish_active_key_bindings
|
if set -q __fish_active_key_bindings
|
||||||
echo "Keeping $__fish_active_key_bindings" >&2
|
echo "Keeping $__fish_active_key_bindings" >&2
|
||||||
return 1
|
return 1
|
||||||
else
|
else if functions -q fish_default_key_bindings
|
||||||
echo "Reverting to default bindings" >&2
|
echo "Reverting to default bindings" >&2
|
||||||
set fish_key_bindings fish_default_key_bindings
|
set fish_key_bindings fish_default_key_bindings
|
||||||
# Return because we are called again
|
# Return because we are called again
|
||||||
return 0
|
return 0
|
||||||
|
else
|
||||||
|
# If we can't even find the default bindings, something is broken.
|
||||||
|
# Without it, we would eventually run into the stack size limit, but that'd print hundreds of duplicate lines
|
||||||
|
# so we should give up earlier.
|
||||||
|
echo "Cannot find fish_default_key_bindings, falling back to very simple bindings." >&2
|
||||||
|
echo "Most likely something is wrong with your installation." >&2
|
||||||
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
set -g __fish_active_key_bindings "$fish_key_bindings"
|
set -g __fish_active_key_bindings "$fish_key_bindings"
|
||||||
|
|
Loading…
Reference in a new issue