Skip to content
Myr

options.go

This file

Path

write/options.go

36 lines · 2.8 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 2ee90c8 point at it.

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

lines 1–2why, one step back
1package write
2

feat: handle interrupts and timeouts (#747)Carlos Alexandro Beckerbefore adoption4f46952

lines 3–4why, one step back
3import (
4 "time"

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

line 5why, one step back
5

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

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

feat: handle interrupts and timeouts (#747)Carlos Alexandro Beckerbefore adoption4f46952

lines 7–8why, one step back
7)
8

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

lines 9–10why, one step back
9// Options are the customization options for the textarea.
10type Options struct {

feat: handle interrupts and timeouts (#747)Carlos Alexandro Beckerbefore adoption4f46952

lines 11–18why, one step back
11 Width int `help:"Text area width (0 for terminal width)" default:"0" env:"GUM_WRITE_WIDTH"`
12 Height int `help:"Text area height" default:"5" env:"GUM_WRITE_HEIGHT"`13 Header string `help:"Header value" default:"" env:"GUM_WRITE_HEADER"`14 Placeholder string `help:"Placeholder value" default:"Write something..." env:"GUM_WRITE_PLACEHOLDER"`15 Prompt string `help:"Prompt to display" default:"┃ " env:"GUM_WRITE_PROMPT"`16 ShowCursorLine bool `help:"Show cursor line" default:"false" env:"GUM_WRITE_SHOW_CURSOR_LINE"`17 ShowLineNumbers bool `help:"Show line numbers" default:"false" env:"GUM_WRITE_SHOW_LINE_NUMBERS"`18 Value string `help:"Initial value (can be passed via stdin)" default:"" env:"GUM_WRITE_VALUE"`

fix(write): max height, max chars (#753)Carlos Alexandro Beckerbefore adoption01892a0

lines 19–20why, one step back
19 CharLimit int `help:"Maximum value length (0 for no limit)" default:"0"`
20 MaxLines int `help:"Maximum number of lines (0 for no limit)" default:"0"`

feat: handle interrupts and timeouts (#747)Carlos Alexandro Beckerbefore adoption4f46952

lines 21–23why, one step back
21 ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_WRITE_SHOW_HELP"`
22 CursorMode string `prefix:"cursor." name:"mode" help:"Cursor mode" default:"blink" enum:"blink,hide,static" env:"GUM_WRITE_CURSOR_MODE"`23 Timeout time.Duration `help:"Timeout until choose returns selected element" default:"0s" env:"GUM_WRITE_TIMEOUT"`

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

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

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

line 25why, one step back
25

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

line 26why, one step back
26 BaseStyle style.Styles `embed:"" prefix:"base." envprefix:"GUM_WRITE_BASE_"`

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

lines 27–28why, one step back
27 CursorLineNumberStyle style.Styles `embed:"" prefix:"cursor-line-number." set:"defaultForeground=7" envprefix:"GUM_WRITE_CURSOR_LINE_NUMBER_"`
28 CursorLineStyle style.Styles `embed:"" prefix:"cursor-line." envprefix:"GUM_WRITE_CURSOR_LINE_"`

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

lines 29–34why, one step back
29 CursorStyle style.Styles `embed:"" prefix:"cursor." set:"defaultForeground=212" envprefix:"GUM_WRITE_CURSOR_"`
30 EndOfBufferStyle style.Styles `embed:"" prefix:"end-of-buffer." set:"defaultForeground=0" envprefix:"GUM_WRITE_END_OF_BUFFER_"`31 LineNumberStyle style.Styles `embed:"" prefix:"line-number." set:"defaultForeground=7" envprefix:"GUM_WRITE_LINE_NUMBER_"`32 HeaderStyle style.Styles `embed:"" prefix:"header." set:"defaultForeground=240" envprefix:"GUM_WRITE_HEADER_"`33 PlaceholderStyle style.Styles `embed:"" prefix:"placeholder." set:"defaultForeground=240" envprefix:"GUM_WRITE_PLACEHOLDER_"`34 PromptStyle style.Styles `embed:"" prefix:"prompt." set:"defaultForeground=7" envprefix:"GUM_WRITE_PROMPT_"`

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

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

feat(deps): bump github.com/charmbracelet/lipgloss (#655)dependabot[bot]before adoption2ee90c8

line 36why, one step back
36}