select: update page (#12325)
* select: update page --------- Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:
@@ -7,9 +7,13 @@
|
||||
|
||||
`select {{word}} in {{apple}} {{orange}} {{pear}} {{banana}}; do echo ${{word}}; done`
|
||||
|
||||
- Create a menu for picking a file or folder from the current directory:
|
||||
- Create a menu from the output of another command:
|
||||
|
||||
`select {{file}} in *; do echo ${{file}}; done`
|
||||
`select {{line}} in $({{command}}); do echo ${{line}}; done`
|
||||
|
||||
- Specify the prompt string for `select` and create a menu for picking a file or folder from the current directory:
|
||||
|
||||
`PS3="{{Select a file: }}"; select {{file}} in *; do echo ${{file}}; done`
|
||||
|
||||
- Create a menu from a Bash array:
|
||||
|
||||
|
Reference in New Issue
Block a user