1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-09-10 17:53:50 +02:00

whiptail, gum, dialog: fix style guide issues and refer to each other (#17955)

This commit is contained in:
Managor 2025-09-06 07:49:19 +03:00 committed by GitHub
parent 9031be70ed
commit 12db3891ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,7 @@
# gum
> Make glamorous shell scripts.
> See also: `whiptail`, `dialog`.
> More information: <https://github.com/charmbracelet/gum>.
- Interactively pick a specific option to print to `stdout`:
@ -17,11 +18,11 @@
- Show a spinner while a command is taking place with text alongside:
`gum spin --spinner {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" -- {{command}}`
`gum spin {{[-s|--spinner]}} {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" -- {{command}}`
- Format text to include emojis:
`gum format -t {{emoji}} "{{:smile: :heart: hello}}"`
`gum format {{[-t|--type]}} {{emoji}} "{{:smile: :heart: hello}}"`
- Interactively prompt for multi-line text (`<Ctrl d>` to save) and write to `data.txt`:

View file

@ -1,6 +1,7 @@
# dialog
> Display dialog boxes on the terminal.
> See also: `gum`, `whiptail`.
> More information: <https://manned.org/dialog>.
- Display a message:

View file

@ -1,6 +1,7 @@
# whiptail
> Display text-based dialog boxes from shell scripts.
> See also: `dialog`, `gum`.
> More information: <https://manned.org/whiptail>.
- Display a simple message:
@ -25,4 +26,4 @@
- Display a multiple-choice menu:
`{{result_variable_name}}=$(whiptail --title "{{title}}" --menu "{{message}}" {{height_in_chars}} {{width_in_chars}} {{menu_display_height}} "{{value_1}}" "{{display_text_1}}" "{{value_n}}" "{{display_text_n}}" ..... 3>&1 1>&2 2>&3)`
`{{result_variable_name}}=$(whiptail --title "{{title}}" --menu "{{message}}" {{height_in_chars}} {{width_in_chars}} {{menu_display_height}} {{"value_1" "display_text_1" "value_2" "display_text_2" ...}} 3>&1 1>&2 2>&3)`