mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 20:11:19 +08:00
gum: update page (#18012)
* gum: update page * Update pages/common/gum.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --------- Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
+5
-5
@@ -2,11 +2,11 @@
|
||||
|
||||
> Make glamorous shell scripts.
|
||||
> See also: `whiptail`, `dialog`.
|
||||
> More information: <https://github.com/charmbracelet/gum>.
|
||||
> More information: <https://github.com/charmbracelet/gum#tutorial>.
|
||||
|
||||
- Interactively pick a specific option to print to `stdout`:
|
||||
|
||||
`gum choose "{{option_1}}" "{{option_2}}" "{{option_3}}"`
|
||||
`gum choose {{"option1" "option2" "..."}}`
|
||||
|
||||
- Open an interactive prompt for the user to input a string with a specific placeholder:
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
- Show a spinner while a command is taking place with text alongside:
|
||||
|
||||
`gum spin {{[-s|--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|--type]}} {{emoji}} "{{:smile: :heart: hello}}"`
|
||||
|
||||
- Interactively prompt for multi-line text (`<Ctrl d>` to save) and write to `data.txt`:
|
||||
- Interactively prompt for multi-line text and write the input to a file:
|
||||
|
||||
`gum write > {{data.txt}}`
|
||||
`gum write > {{path/to/file}}`
|
||||
|
||||
Reference in New Issue
Block a user