Skip to content
Myr

options.go

This file

Path

confirm/options.go

25 lines · 1.6 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 confirm
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–11why, one step back
7)
89// Options is the customization options for the confirm command.10type Options struct {11 Default bool `help:"Default confirmation action" default:"true"`

feat(confirm): add `--show-output` (#427)vahnrrbefore adoptiond1bfd56

line 12why, one step back
12 ShowOutput bool `help:"Print prompt and chosen action to output" default:"false"`

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

lines 13–22why, one step back
13 Affirmative string `help:"The title of the affirmative action" default:"Yes"`
14 Negative string `help:"The title of the negative action" default:"No"`15 Prompt string `arg:"" help:"Prompt to display." default:"Are you sure?"`16 //nolint:staticcheck17 PromptStyle style.Styles `embed:"" prefix:"prompt." help:"The style of the prompt" set:"defaultMargin=0 0 0 1" set:"defaultForeground=#7571F9" set:"defaultBold=true" envprefix:"GUM_CONFIRM_PROMPT_"`18 //nolint:staticcheck19 SelectedStyle style.Styles `embed:"" prefix:"selected." help:"The style of the selected action" set:"defaultBackground=212" set:"defaultForeground=230" set:"defaultPadding=0 3" set:"defaultMargin=0 1" envprefix:"GUM_CONFIRM_SELECTED_"`20 //nolint:staticcheck21 UnselectedStyle style.Styles `embed:"" prefix:"unselected." help:"The style of the unselected action" set:"defaultBackground=235" set:"defaultForeground=254" set:"defaultPadding=0 3" set:"defaultMargin=0 1" envprefix:"GUM_CONFIRM_UNSELECTED_"`22 ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_CONFIRM_SHOW_HELP"`

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

line 23why, one step back
23 Timeout time.Duration `help:"Timeout until confirm returns selected value or default if provided" default:"0s" env:"GUM_CONFIRM_TIMEOUT"`

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

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

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

line 25why, one step back
25}