mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 11:41:10 +08:00
share/config: Erase on_interactive before doing __fish_config_interactive
This removes a possibility of an infinite loop where something in __fish_config_interactive triggers a fish_prompt or fish_read event, which calls __fish_on_interactive which calls __fish_config_interactive again, ... Fixes #9564 (cherry picked from commit 7ac2fe2bd3401d57cd980fa0706ed4c7a2116746)
This commit is contained in:
parent
fdf075149f
commit
822203d7b0
@ -141,8 +141,10 @@ end
|
||||
# This handler removes itself after it is first called.
|
||||
#
|
||||
function __fish_on_interactive --on-event fish_prompt --on-event fish_read
|
||||
__fish_config_interactive
|
||||
# We erase this *first* so it can't be called again,
|
||||
# e.g. if fish_greeting calls "read".
|
||||
functions -e __fish_on_interactive
|
||||
__fish_config_interactive
|
||||
end
|
||||
|
||||
# Set the locale if it isn't explicitly set. Allowing the lack of locale env vars to imply the
|
||||
|
Loading…
x
Reference in New Issue
Block a user