Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"fish_greeting" executing "read" will execute "fish_greeting" will execute "read" will ... #9564

Closed
Korkman opened this issue Feb 11, 2023 · 0 comments
Labels
bug Something that's not working as intended
Milestone

Comments

@Korkman
Copy link

Korkman commented Feb 11, 2023

fish_greeting.fish:

function fish_greeting
    echo "Hi, this is fish_greeting asking for trouble"
    read trouble
end

This will cause an infinite loop because "read" apparently triggers "fish_greeting". Environment:

# fish --version
fish, version 3.6.0
# echo $version
3.6.0
# uname -a
Linux hostname 6.0.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1 (2022-12-09) x86_64 GNU/Linux
# echo $TERM
xterm-256color

Did not happen in 3.5.1.

@faho faho closed this as completed in 7ac2fe2 Feb 11, 2023
@faho faho added the bug Something that's not working as intended label Feb 11, 2023
@faho faho added this to the fish 3.6.1 milestone Feb 11, 2023
zanchey pushed a commit that referenced this issue Feb 27, 2023
…tive

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 7ac2fe2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants