Skip to content

TUI: allow responding to prompts with Return (defaulting to Yes) #1253

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

jhrcek
Copy link
Contributor

@jhrcek jhrcek commented Apr 13, 2025

There's this convention in linux CLI tools that if you're asking users for yes/no response, then you highlight the default choice with uppercase (e.g. [Y/n]) and let user stick with the default by just pressing Enter/Return.

This behavior is already present in bunch of places in ghcup installer. Could we please also support this in the prompts used by TUI?

@jhrcek jhrcek changed the title TUI: allow responding to prompts with Return (defaulting to Yes response) TUI: allow responding to prompts with Return (defaulting to Yes) Apr 13, 2025
@jhrcek jhrcek force-pushed the jan/accept-default-response branch from 01861cc to 8b72803 Compare April 13, 2025 15:21
Copy link
Collaborator

@dfordivam dfordivam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hasufell hasufell merged commit db717e3 into haskell:master Apr 15, 2025
53 of 54 checks passed
@hasufell
Copy link
Member

terrific!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants