Skip to content
Myr

options.go

This file

Path

input/options.go

27 lines · 1.9 KiB · Go

Last changed by

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

History of this file

Take it

The walk stopped after 200 commits: lines older than 6837ed2 point at it.

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 1–5why, one step back
1package input
23import (4 "time"5

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

line 6why, one step back
6 "charm.land/gum/v2/style"

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 7–20why, one step back
7)
89// Options are the customization options for the input.10type Options struct {11 Placeholder string `help:"Placeholder value" default:"Type something..." env:"GUM_INPUT_PLACEHOLDER"`12 Prompt string `help:"Prompt to display" default:"> " env:"GUM_INPUT_PROMPT"`13 PromptStyle style.Styles `embed:"" prefix:"prompt." envprefix:"GUM_INPUT_PROMPT_"`14 PlaceholderStyle style.Styles `embed:"" prefix:"placeholder." set:"defaultForeground=240" envprefix:"GUM_INPUT_PLACEHOLDER_"`15 CursorStyle style.Styles `embed:"" prefix:"cursor." set:"defaultForeground=212" envprefix:"GUM_INPUT_CURSOR_"`16 CursorMode string `prefix:"cursor." name:"mode" help:"Cursor mode" default:"blink" enum:"blink,hide,static" env:"GUM_INPUT_CURSOR_MODE"`17 Value string `help:"Initial value (can also be passed via stdin)" default:""`18 CharLimit int `help:"Maximum value length (0 for no limit)" default:"400"`19 Width int `help:"Input width (0 for terminal width)" default:"0" env:"GUM_INPUT_WIDTH"`20 Password bool `help:"Mask input characters" default:"false"`

refactor: removing huh as a dep (#742)Carlos Alexandro Beckerbefore adoptione30fc5e

line 21why, one step back
21 ShowHelp bool `help:"Show help keybinds" default:"true" negatable:"" env:"GUM_INPUT_SHOW_HELP"`

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 22–23why, one step back
22 Header string `help:"Header value" default:"" env:"GUM_INPUT_HEADER"`
23 HeaderStyle style.Styles `embed:"" prefix:"header." set:"defaultForeground=240" envprefix:"GUM_INPUT_HEADER_"`

fix(choose,confirm,file,filter,input,pager,spin): timeout default unit (#724)Carlos Alexandro Beckerbefore adoption098d09a

line 24why, one step back
24 Timeout time.Duration `help:"Timeout until input aborts" default:"0s" env:"GUM_INPUT_TIMEOUT"`

feat: --no-strip-ansi (#784)Carlos Alexandro Beckerbefore adoption4cedf9f

line 25why, one step back
25 StripANSI bool `help:"Strip ANSI sequences when reading from STDIN" default:"true" negatable:"" env:"GUM_INPUT_STRIP_ANSI"`

feat: adding --padding to most commands (#960)Carlos Alexandro Beckerbefore adoption6045525

line 26why, one step back
26 Padding string `help:"Padding" default:"${defaultPadding}" group:"Style Flags" env:"GUM_INPUT_PADDING"`

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

line 27why, one step back
27}