gum Glamorous shell scripts
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
gum choose <a> <b>
gum filtergum inputgum confirmgum spin -- <cmd>
gum style <text>
gum log <msg>
gum writeConcepts
- gum prompt choose, input, confirm
- Shell variable $(...) or if
- Script action spin, log, style
Choose and filter
gum choose <a> <b> <c>
gum choose --no-limit
gum choose --limit <n>
gum choose --header <text>
gum choose --height <n>
gum filtergum filter --limit <n>
gum filter --placeholder <text>
gum file <dir>
gum table < <file>.csv
Input
gum inputgum input --placeholder <text>
gum input --value <text>
gum input --password
gum input --prompt <text>
gum input --width <n>
gum writegum write --placeholder <text>
Confirm and run
gum confirmgum confirm && <cmd> || <cmd>
gum confirm "<question>"
gum confirm --affirmative <yes> --negative
<no>
gum spin --title <text> -- <cmd>
gum spin --spinner <type>
gum spin --show-output -- <cmd>
Style and output
gum style <text>
gum style --foreground <n> <text>
gum style --border double <text>
gum style --padding "<v> <h>"
<text>
gum style --margin "<v> <h>"
<text>
gum style --width <n> --align center
<text>
gum join --vertical <a> <b>
gum join --align center <a> <b>
gum format <markdown>
gum format -t code
gum format -t emoji
gum pager < <file>
gum log --level <lvl> <msg>
gum log --structured <msg> <key>
<val>
gum log --time rfc822 <msg>
Environment
GUM_INPUT_PLACEHOLDER=<text>
GUM_INPUT_PROMPT=<text>
GUM_INPUT_WIDTH=<n>
Recipes
BRANCH=$(git branch --format='%(refname:short)' | gum filter)gum confirm "Delete $BRANCH?" && git branch -D "$BRANCH"
TYPE=$(gum choose fix feat docs chore)MSG=$(gum input --placeholder "summary")git commit -m "$TYPE: $MSG"
gum spin --spinner dot --title "Building..." -- make buildgum log --level info "build done"
FILES=$(gum file . )$EDITOR "$FILES"



