-
Notifications
You must be signed in to change notification settings - Fork 2.1k
commandline -r broken in Fish 3.4.0? #8807
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
Comments
You're going to have to add some more context here. Specifically, what triggers the For the record: bind \eb 'commandline -r xyz' and pressing alt+b works for me. |
Hi Fabian, thanks for your reply. For me, My function in ~/.config/fish/functions/commit.fish which prepares a git commit message that includes the JIRA issue key:
|
If you run The same thing goes for the function when you run that interactively. I.e. if you enter Having that change the commandline and then have it magically appear later isn't something we can really support. If it did work in earlier versions that's by accident. Now, what should be working is to do it as a binding:
Note: fish_user_key_bindings hasn't been needed since fish 3.0. It will still be executed if it is there, but it's not necessary. But just to confirm: If you run bind \cg 'commandline -r xyz' in an interactive session, and then you press ctrl+g in that interactive session, does it replace the commandline with "xyz"? (I switched it from alt+b because I remembered some mac terminals like sending bad things for alt bindings if some setting is checked) |
Your latest binding to Ctrl+G works! Thank you! :-) |
EDIT: apologies, I had not tested it as thouroughly as I thought. this is not working. I restored the original behaviour with a small function:
(append to end of fish_prompt):
|
Interesting! I never knew that using Like I guess the closest thing would be to |
Thanks for the suggestion @phillco. In case anyone else would benefit from an example, my use case was to take the current
Then you can setup a keybinding in |
This keeps coming up and it looks easy enough to fix, so I will just fix it. |
Oh, man, awesome! Thanks! This is one of those features that makes |
@ridiculousfish I guess this deserves a release? |
@adrian-gierakowski A release will be out in time. We tend to do one every few months, not for specific features. |
Just to close the loop for anyone subscribed, @ridiculousfish's fix shipped in 3.5.0: https://fishshell.com/docs/current/relnotes.html#fish-3-5-0-released-june-16-2022 :) |
I use Mac OS Montery 12.3 and iTerm2 and just upgraded Fish shell to 3.4.0.
One of my functions stopped working, because
commandline -r "xyz"
does not replace the command line anymore.-a
does not seem to work either.I've seen that the
commandline
command has been updated, but it seems that the old behavior should still work.The text was updated successfully, but these errors were encountered: