Skip to content

broken prompt for read in scripts #9227

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

Closed
Wasja7 opened this issue Sep 21, 2022 · 1 comment
Closed

broken prompt for read in scripts #9227

Wasja7 opened this issue Sep 21, 2022 · 1 comment
Labels
regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@Wasja7
Copy link

Wasja7 commented Sep 21, 2022

fish, version 3.5.1 on Arch Linux

Since the update to 3.5.0 the prompt behaves strangely when called with read in a script. Keybindings for cursor navigation like Ctrl+a or Ctrl+e don't work. In vi-mode the mode indicator always shows "[N]", changing the mode doesn't work at all.
This is easily reproducible by running fish -c 'read'. Calling read in an interactive mode doesn't have this problem.
Maybe this has something to do with #8797?

@Wasja7 Wasja7 changed the title broken prompt for read -S in scripts broken prompt for read in scripts Sep 21, 2022
@faho faho closed this as completed in af3a5b8 Sep 21, 2022
@faho faho added the regression Something that used to work, but was broken, especially between releases label Sep 21, 2022
@faho faho added this to the fish 3.6.0 milestone Sep 21, 2022
@faho
Copy link
Member

faho commented Sep 21, 2022

Indeed, this was caused by us not setting up keybindings when fish_prompt wasn't fired.

Should be fixed now by simply doing interactive setup when an interactive read is called as well.

(in future we could skip some of it, but this should be harmless since it worked that way up to 3.5.0, so this is the conservative choice)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Something that used to work, but was broken, especially between releases
Projects
None yet
Development

No branches or pull requests

2 participants