Browse Source

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>
Emily Grace Seville 2 years ago
parent
commit
fc968a715d
1 changed files with 12 additions and 13 deletions
  1. 12 13
      pages/windows/choice.md

+ 12 - 13
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: <https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/choice>.
 
-- A,B and C as list of choices to be used:
+- Prompt the current user to select a `Y` or `N` choice:
 
-`choice /c {{ABC}}`
+`choice`
 
-- Use the default [Y,N] list of choices:
+- Prompt the current user to select a [c]hoice from a specific set:
 
-`choice`
+`choice /c {{AB}}`
 
-- Specify that the choices are case-sensitive:
+- Prompt the current user to select a choice with a specific [m]essage:
 
-`choice /CS {{AaBb}}`
+`choice /m "{{message}}"`
 
-- Specify the number of seconds to pause before using the default choice specified by `/d`:
+- Prompt the current user to select a [c]ase-[s]ensitive [c]hoice from a specific set:
 
-`choice /C {{AaBb}} /t {{3}} /d {{b}}`
+`choice /cs /c {{Ab}}`
 
-- 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 choice and prefer the [d]efault choice in a specific [t]ime:
 
-`choice /m {{message}} /C {{ABC}}`
+`choice /t {{5}} /d {{N}}`
 
-- Display help message:
+- Display help:
 
 `choice /?`