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>
pull/23/head
Managor 2024-02-25 18:51:18 +02:00 committed by GitHub
parent e334f1e0da
commit 56d77e0f72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -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: