You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fish_config choose leaves previous right prompt in place #8314
This is on purpose. It does not touch the right prompt if there is none. The idea is that this allows you to do more, because you can now add your own right prompt to it.
It's wacky "default" can't return the user to the default prompt on both sides, and I suggest we find a way to prevent users entering these weird intermediate states shown in my screenshot while trying prompts. It should be possible to distinguish a right prompt selected in fish_config from a fish_prompt function a user saved on their own, and/or possible to set a uvar with the prompt name selected and source the prompt's .fish file on launch rather than actually funcsave it perhaps, if it is important that we do preserve right prompts between changes.
As it is, the user needs to find and delete a function or file to actually switch back to something else after trying a prompt that provides both left and right, that's kinda awkward.
Really, my case for keeping whatever right prompt is this:
It's easier to write
It allows you to set a right prompt, then pick a left prompt to go with it, to augment it. Or even, yes, to pick the right prompt from one and leave it?
Erasing the right prompt or setting it after is easy
If you're just doing it interactively, you can always simply restart the shell. That's easy and fixes everything, so we want to encourage it.
I'm sorry, but I really don't enjoy having things I worked hard on, months ago, that were open for comments for a while then, to be called "a UX nightmare".
Especially given that we'd want this to be available in config.fish
Why?
So you can do fish_config prompt choose disco, and it will select the disco prompt, and keep tracking the new version! We've had issues with the old one sticking around.
Plus there is literally no reason not to.
It does a funcsave just like the HTML interface, correct? That should not be necessary.
choose does not. It simply sources, temporarily. That's what save is for.
So you can do fish_config prompt choose disco, and it will select the disco prompt, and keep tracking the new version!
I do think tracking the newest version is valuable, but I don't really think we want to require people to make a configuration file. How about remembering the prompt name in a uvar and setting it in one of our initialization functions if the user hasn't customized it? Kinda like keybindings.
I'm sorry, I didn't mean to be rude. I don't really know the history of this feature. I'm glad a CLI interface to the web config is being added.
Could we just have default specify an empty right prompt with the logic that choosing the default is akin to resetting? I do think the current behavior is a tad confusing in that regard, since you don't end up with what you might intuitively expect the "default" to be after that operation. It would preserve the current behavior for any other prompt, so it's a bit of a compromise.
Reacted by David Adam, Yaksh Bariya and Aaron Gyes
Could we just have default specify an empty right prompt with the logic that choosing the default is akin to resetting?
That's inconsistent and I don't think running
fish_config prompt choose disco # or another prompt with a right component
fish_config prompt choose default # to reset it
fish_config prompt choose nim # a prompt without a right component
Activity
faho commentedon Sep 24, 2021
This is on purpose. It does not touch the right prompt if there is none. The idea is that this allows you to do more, because you can now add your own right prompt to it.
floam commentedon Sep 24, 2021
It's a UX nightmare.
floam commentedon Sep 24, 2021
It's wacky "default" can't return the user to the default prompt on both sides, and I suggest we find a way to prevent users entering these weird intermediate states shown in my screenshot while trying prompts. It should be possible to distinguish a right prompt selected in
fish_configfrom afish_promptfunction a user saved on their own, and/or possible to set a uvar with the prompt name selected and source the prompt's.fishfile on launch rather than actuallyfuncsaveit perhaps, if it is important that we do preserve right prompts between changes.floam commentedon Sep 24, 2021
I guess I won't reapply the bug label. What do other @fish-shell/contributors think?
faho commentedon Sep 24, 2021
Awww, come on, that's a tad dramatic.
floam commentedon Sep 24, 2021
We could prompt the user and ask them if they would like to affect both sides, yes or no.
faho commentedon Sep 24, 2021
Oh please no, constant prompts are also awkward.
Especially given that we'd want this to be available in config.fish, and then it would have to
isatty, and how do you then do it in config.fish?floam commentedon Sep 24, 2021
As it is, the user needs to find and delete a function or file to actually switch back to something else after trying a prompt that provides both left and right, that's kinda awkward.
floam commentedon Sep 24, 2021
Why?
floam commentedon Sep 24, 2021
It does a funcsave just like the HTML interface, correct? That should not be necessary.
faho commentedon Sep 24, 2021
Really, my case for keeping whatever right prompt is this:
I'm sorry, but I really don't enjoy having things I worked hard on, months ago, that were open for comments for a while then, to be called "a UX nightmare".
So you can do
fish_config prompt choose disco, and it will select the disco prompt, and keep tracking the new version! We've had issues with the old one sticking around.Plus there is literally no reason not to.
choosedoes not. It simplysources, temporarily. That's whatsaveis for.floam commentedon Sep 24, 2021
I do think tracking the newest version is valuable, but I don't really think we want to require people to make a configuration file. How about remembering the prompt name in a uvar and setting it in one of our initialization functions if the user hasn't customized it? Kinda like keybindings.
I'm sorry, I didn't mean to be rude. I don't really know the history of this feature. I'm glad a CLI interface to the web config is being added.
floam commentedon Sep 24, 2021
Hm, ok. I was unaware. How about
try?faho commentedon Sep 24, 2021
We... uh, want to move away from uvars (#7379).
That's also much more brittle and annoying than, you know, simply doing the same thing.
faho commentedon Sep 24, 2021
I'm sorry, that would have been great months ago before it was released in fish 3.3.0. I do not want to change this or add another name for it now.
mqudsi commentedon Sep 24, 2021
Could we just have
defaultspecify an empty right prompt with the logic that choosing the default is akin to resetting? I do think the current behavior is a tad confusing in that regard, since you don't end up with what you might intuitively expect the "default" to be after that operation. It would preserve the current behavior for any other prompt, so it's a bit of a compromise.faho commentedon Sep 26, 2021
That's inconsistent and I don't think running
is super intuitive.
faho commentedon Sep 26, 2021
Let's just do the thing that apparently other people think is better.
I still don't agree, but I don't have a desire to squabble over minutia like this.
CHANGELOG updates for 3.4.0