Skip to content
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

Show a prompt character when asking a multiple choice question #184

Closed
christianrondeau opened this issue Mar 20, 2015 · 1 comment
Closed
Assignees
Milestone

Comments

@christianrondeau
Copy link
Contributor

Right now, when asking a multiple choice question such as which version to uninstall, there is no indication that a user input is expected:

Which version of vagrant would you like to uninstall?
 1) None [Default - Press Enter]
 2) 1.5.4
 3) 1.6.3
 4) 1.6.5
 5) All versions
1

Adding an input indicator such as the > character would make this clearer:

Which version of vagrant would you like to uninstall?
 1) None [Default - Press Enter]
 2) 1.5.4
 3) 1.6.3
 4) 1.6.5
 5) All versions
> 1

For more details: https://groups.google.com/forum/#!topic/chocolatey/UVncL7PxXRg

(Moved from chocolatey-archive/chocolatey#692)

@christianrondeau
Copy link
Contributor Author

Depends on #181 (I will reuse the Console.Write + Console.ReadLine to group the > character and the prompt input)

@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.9.9 Sep 18, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.1 Oct 3, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.1 Mar 29, 2016
@ferventcoder ferventcoder self-assigned this Mar 29, 2016
ferventcoder pushed a commit that referenced this issue Mar 29, 2016
Right now, when asking a multiple choice question such as which version to
uninstall, there is no indication that a user input is expected. Add an input
indicator ">" to make this clearer.

Certain questions are spread out across multiple lines when they could
be on just one line as a short prompt that include the choices in parentheses.
For example, instead of

"Do you want to run the script?

1) yes
2) no
3) skip
>
"

it could simply be "Do you want to run the script? (Yes/No/Print): yes".

If the prompt allows for short answers, then provide hints that the answer
can be a single keystroke. For example
"Do you want to run the script? ([Y]es/[N]o/[P]rint): y"

In a short prompt, if there is a default answer, surround it with braces
as well. For example
"Do you want to run the script? ([[Y]es]/[N]o/[P]rint): _"
ferventcoder added a commit that referenced this issue Mar 29, 2016
* pr204:
  (GH-181)(GH-184) Short prompt/Prompt character
ferventcoder added a commit that referenced this issue Mar 29, 2016
* stable:
  (GH-460) Amended Template
  (GH-623) Extract Nuspec on Install
  (GH-674)(GH-672) Color Overrides / Fix Write-Host
  (GH-181) log selection to log file only
  (GH-181)(GH-184) Short prompt/Prompt character
  (GH-675) Template include LICENSE/VERIFICATION
  (GH-258) Rename zip to detector.zip
  (GH-572) Fix: The handle is invalid - Output Redirection
  (maint) comments
  (GH-667) Provide How To Add Profile Manually
  (GH-667) PowerShell Custom Host - Set $Profile
  (GH-666) pass Write-ChocolateyError message param
  (GH-673) Ensure Get-BinRoot Warning is Shown
  (GH-666) setup logs colored write-host w/fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants