gum

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
gum [2023-06-21 05:41] – created asdfgum [2023-06-25 01:29] (current) – added details on subcommands asdf
Line 1: Line 1:
-====== Gum ======+====== gum ====== 
 +A command-line tool for adding attractive interactivity to shell scripts.
  
-{{tag>software}}+===== Subcommands ===== 
 +==== choose ==== 
 +Selects one or more values from a given list of options. Unlike ''filter'', ''choose'' does not allow the user to search through the list. 
 + 
 +==== confirm ==== 
 +Prompts for confirmation, returning ''0'' on an affirmative answer and ''1'' on a negative one. This leads to the general form ''gum confirm && YES_CMD || NO_CMD''.  
 + 
 +<code bash> 
 +gum confirm && ls || echo "never mind" 
 +</code> 
 + 
 +==== file ==== 
 +Navigates through a given path to select and output a filename.  
 + 
 +==== filter ==== 
 +Chooses one or more values from a newline-separated list. 
 + 
 +==== format ==== 
 +Renders the input as a Go template. 
 + 
 +==== input ==== 
 +Requests a single line of input, printing the output.  
 + 
 +==== join ==== 
 +Joins text horizontally or vertically.  
 + 
 +==== pager ==== 
 +Pages through data passed to stdin. 
 + 
 +==== spin ==== 
 +Displays a spinner for the duration of a command. Available spinners include: 
 + 
 +  * line 
 +  * dot (default) 
 +  * minidot 
 +  * jump 
 +  * pulse 
 +  * points 
 +  * globe 
 +  * moon 
 +  * monkey 
 +  * meter 
 +  * hamburger 
 + 
 +==== style ==== 
 +Applies text styling to its input. 
 + 
 +==== table ==== 
 +Renders a table of data. By default, it expects the data to be in CSV format. 
 + 
 +==== write ==== 
 +Multi-line text input with complete cursor-based editing. 
 + 
 +===== Customization ===== 
 +===== Resources ===== 
 +  * [[https://github.com/charmbracelet/gum|GitHub page]] 
 +  * [[https://hackaday.com/2023/03/29/linux-fu-gum-up-your-script/|Hackaday article]] 
 + 
 +{{tag>software needswork}}
  • gum.1687326103.txt.gz
  • Last modified: 2023-06-21 05:41
  • by asdf