From fc968a715da2087cfb82bc02ffd086dad5ddaae8 Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Sun, 21 Aug 2022 17:03:37 +1000 Subject: [PATCH] choice: update page (#8351) * Refresh choice.md * Fix help example * Fix syntax error * Fix grammar error Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> * Fix grammar error Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> * Use `the current user` * Remove .swp file * Simplify --help example * Fix grammar error Co-authored-by: Jack Lin <46962923+blueskyson@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com> Co-authored-by: Jack Lin <46962923+blueskyson@users.noreply.github.com> --- pages/windows/choice.md | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/pages/windows/choice.md b/pages/windows/choice.md index 3a0c3d1da9..e832c1bf6b 100644 --- a/pages/windows/choice.md +++ b/pages/windows/choice.md @@ -1,29 +1,28 @@ # choice -> Prompts the user to select one item from a list of single-character choices in a batch program, and then returns the index of the selected choice. -> If used without parameters, choice displays the default choices Y and N. +> Prompt user to select a choice and return the selected choice index. > More information: . -- A,B and C as list of choices to be used: - -`choice /c {{ABC}}` - -- Use the default [Y,N] list of choices: +- Prompt the current user to select a `Y` or `N` choice: `choice` -- Specify that the choices are case-sensitive: +- Prompt the current user to select a [c]hoice from a specific set: -`choice /CS {{AaBb}}` +`choice /c {{AB}}` -- Specify the number of seconds to pause before using the default choice specified by `/d`: +- Prompt the current user to select a choice with a specific [m]essage: -`choice /C {{AaBb}} /t {{3}} /d {{b}}` +`choice /m "{{message}}"` -- Specify a message to display before the list of choices. If `/m` is not specified, only the choice prompt is displayed: +- Prompt the current user to select a [c]ase-[s]ensitive [c]hoice from a specific set: -`choice /m {{message}} /C {{ABC}}` +`choice /cs /c {{Ab}}` -- Display help message: +- Prompt the current user to select a choice and prefer the [d]efault choice in a specific [t]ime: + +`choice /t {{5}} /d {{N}}` + +- Display help: `choice /?`