-
Notifications
You must be signed in to change notification settings - Fork 101
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
reinstall: Stop waiting for newline after prompt is answered #1131
Conversation
This is more intuitive. Signed-off-by: ckyrouac <[email protected]>
(Disclaimer, I haven't actually tried running My initial reaction is that the newline is expected. The canonical example for me is |
ah right, of course. I think what threw me off is the way it's presented. Hitting There's feedback when using dnf, e.g.:
This happens when hitting
Looks like the prompt is (partially) repeated only when there is not enough width in the terminal. Otherwise, hitting I might have been confused due to lack of sleep more than anything. Feel free to close if you think it's fine as-is. |
I guess I should actually try to use the tool on a VM to see exactly what you're talking about 😄. But from your explanation the current behavior doesn't look sane to me. I'll play with it a bit later this afternoon. |
The lines repeating on long prompts is a dialoguer bug But it doing nothing is a feature (the selection is communicated through the capitalization of y/n, if y is already capitalized, it means its already selected, not that it's the default. The default is never directly communicated - it's obvious because the default is simply capitalized from the get go) |
Opened console-rs/dialoguer#323 |
We could mitigate the console-rs bug by line wrapping our prompt, right? If progress there is slow on merging patches I'm also fine to vendor dialoguer in our codebase FWIW. (Or probably simpler, point to your fork via As far as the mechanics of not waiting for a newline...I don't have a really strong opinion honestly, but weakly agree with John. |
Agreed, waiting for newline seems standard. The thing that threw me off is the input is not displayed in the terminal. So, pressing "y" on a selection where the default is "y" results in no feedback. Not a big deal, I'm just not used to that behavior. Closing this. |
When I first used the script, I hit
y
expecting my answer to be accepted. When nothing happened, I hity
again and was presented with the same prompt. It took me far too long (I went as far as trying a different shell and terminal) to realize that hittingy
only toggled the selection to capitalY
, I had to also hit "enter". This is the first time I've used a script with this behavior. Maybe I'm in the minority but given that this is supposed to be an intuitive tool, should we toggle this flag?