Skip to content
Myr

chore: prepare v2 (#1116)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Drew Smirnoff · committed by GitHub · parent 4f90464 · Browse files · 28 files+69 added−69 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: drew <me@andrinoff.com>

Diff stats

28 files+69 added−69 removed

  • other:+69 added−69 removed

28 files+69 added−69 removed

modified:choose/command.go+4 added-4 removed
9 unmodified lines
1011 "charm.land/bubbles/v2/help"12 "charm.land/bubbles/v2/paginator"13 tea "charm.land/bubbletea/v2"14 "github.com/charmbracelet/gum/internal/stdin"15 "github.com/charmbracelet/gum/internal/timeout"16 "github.com/charmbracelet/gum/internal/tty"17 "github.com/charmbracelet/gum/style"14 "charm.land/gum/v2/internal/stdin"15 "charm.land/gum/v2/internal/timeout"16 "charm.land/gum/v2/internal/tty"17 "charm.land/gum/v2/style"18)1920// Run provides a shell script interface for choosing between different through21// options.
153 unmodified lines
modified:choose/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options is the customization options for the choose command.10type Options struct {
25 unmodified lines
modified:confirm/command.go+4 added-4 removed
5 unmodified lines
6 "os"78 "charm.land/bubbles/v2/help"9 tea "charm.land/bubbletea/v2"10 "github.com/charmbracelet/gum/internal/exit"11 "github.com/charmbracelet/gum/internal/stdin"12 "github.com/charmbracelet/gum/internal/timeout"13 "github.com/charmbracelet/gum/style"10 "charm.land/gum/v2/internal/exit"11 "charm.land/gum/v2/internal/stdin"12 "charm.land/gum/v2/internal/timeout"13 "charm.land/gum/v2/style"14)1516// Run provides a shell script interface for prompting a user to confirm an17// action with an affirmative or negative answer.
54 unmodified lines
modified:confirm/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options is the customization options for the confirm command.10type Options struct {
15 unmodified lines
modified:cursor/cursor.go+1 added-1 removed
2 unmodified lines
34import (5 "charm.land/bubbles/v2/textarea"6 "charm.land/bubbles/v2/textinput"7 "github.com/charmbracelet/gum/style"7 "charm.land/gum/v2/style"8)910// TextInput applies the given cursor mode and style to the text input.11func TextInput(i *textinput.Model, mode string, s style.Styles) {
15 unmodified lines
modified:file/command.go+2 added-2 removed
7 unmodified lines
89 "charm.land/bubbles/v2/filepicker"10 "charm.land/bubbles/v2/help"11 tea "charm.land/bubbletea/v2"12 "github.com/charmbracelet/gum/internal/timeout"13 "github.com/charmbracelet/gum/style"12 "charm.land/gum/v2/internal/timeout"13 "charm.land/gum/v2/style"14)1516// Run is the interface to picking a file.17func (o Options) Run() error {
62 unmodified lines
modified:file/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options are the options for the file command.10type Options struct {
24 unmodified lines
modified:filter/command.go+5 added-5 removed
9 unmodified lines
10 "charm.land/bubbles/v2/help"11 "charm.land/bubbles/v2/textinput"12 "charm.land/bubbles/v2/viewport"13 tea "charm.land/bubbletea/v2"14 "github.com/charmbracelet/gum/internal/files"15 "github.com/charmbracelet/gum/internal/stdin"16 "github.com/charmbracelet/gum/internal/timeout"17 "github.com/charmbracelet/gum/internal/tty"18 "github.com/charmbracelet/gum/style"14 "charm.land/gum/v2/internal/files"15 "charm.land/gum/v2/internal/stdin"16 "charm.land/gum/v2/internal/timeout"17 "charm.land/gum/v2/internal/tty"18 "charm.land/gum/v2/style"19 "github.com/charmbracelet/x/ansi"20 "github.com/sahilm/fuzzy"21)22
152 unmodified lines
modified:filter/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options is the customization options for the filter command.10type Options struct {
38 unmodified lines
modified:format/command.go+2 added-2 removed
12 unmodified lines
13import (14 "fmt"15 "strings"1617 "github.com/charmbracelet/gum/internal/stdin"18 "github.com/charmbracelet/gum/internal/tty"17 "charm.land/gum/v2/internal/stdin"18 "charm.land/gum/v2/internal/tty"19)2021// Run runs the format command.22func (o Options) Run() error {
27 unmodified lines
modified:input/command.go+4 added-4 removed
6 unmodified lines
78 "charm.land/bubbles/v2/help"9 "charm.land/bubbles/v2/textinput"10 tea "charm.land/bubbletea/v2"11 "github.com/charmbracelet/gum/cursor"12 "github.com/charmbracelet/gum/internal/stdin"13 "github.com/charmbracelet/gum/internal/timeout"14 "github.com/charmbracelet/gum/style"11 "charm.land/gum/v2/cursor"12 "charm.land/gum/v2/internal/stdin"13 "charm.land/gum/v2/internal/timeout"14 "charm.land/gum/v2/style"15)1617// Run provides a shell script interface for the text input bubble.18// https://github.com/charmbracelet/bubbles/textinput
63 unmodified lines
modified:input/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options are the customization options for the input.10type Options struct {
17 unmodified lines
modified:join/command.go+2 added-2 removed
16 unmodified lines
1718import (19 "charm.land/lipgloss/v2"2021 "github.com/charmbracelet/gum/internal/decode"22 "github.com/charmbracelet/gum/internal/tty"21 "charm.land/gum/v2/internal/decode"22 "charm.land/gum/v2/internal/tty"23)2425// Run is the command-line interface for the joining strings through lipgloss.26func (o Options) Run() error {
7 unmodified lines
modified:log/options.go+1 added-1 removed
1package log23import (4 "github.com/charmbracelet/gum/style"4 "charm.land/gum/v2/style"5)67// Options is the set of options that can configure a join.8type Options struct {
20 unmodified lines
modified:pager/command.go+2 added-2 removed
5 unmodified lines
67 "charm.land/bubbles/v2/help"8 "charm.land/bubbles/v2/viewport"9 tea "charm.land/bubbletea/v2"10 "github.com/charmbracelet/gum/internal/stdin"11 "github.com/charmbracelet/gum/internal/timeout"10 "charm.land/gum/v2/internal/stdin"11 "charm.land/gum/v2/internal/timeout"12)1314// Run provides a shell script interface for the viewport bubble.15// https://github.com/charmbracelet/bubbles/viewport
44 unmodified lines
modified:pager/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options are the options for the pager.10type Options struct {
13 unmodified lines
modified:spin/command.go+3 added-3 removed
4 unmodified lines
5 "os"67 "charm.land/bubbles/v2/spinner"8 tea "charm.land/bubbletea/v2"9 "github.com/charmbracelet/gum/internal/exit"10 "github.com/charmbracelet/gum/internal/timeout"11 "github.com/charmbracelet/gum/style"9 "charm.land/gum/v2/internal/exit"10 "charm.land/gum/v2/internal/timeout"11 "charm.land/gum/v2/style"12 "github.com/charmbracelet/x/term"13)1415// Run provides a shell script interface for the spinner bubble.
67 unmodified lines
modified:spin/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options is the customization options for the spin command.10type Options struct {
14 unmodified lines
modified:style/command.go+2 added-2 removed
7 unmodified lines
8import (9 "errors"10 "strings"1112 "github.com/charmbracelet/gum/internal/stdin"13 "github.com/charmbracelet/gum/internal/tty"12 "charm.land/gum/v2/internal/stdin"13 "charm.land/gum/v2/internal/tty"14)1516// Run provides a shell script interface for the Lip Gloss styling.17// https://github.com/charmbracelet/lipgloss
20 unmodified lines
modified:style/lipgloss.go+1 added-1 removed
1 unmodified line
23import (4 "charm.land/lipgloss/v2"56 "github.com/charmbracelet/gum/internal/decode"6 "charm.land/gum/v2/internal/decode"7)89// ToLipgloss takes a Styles flag set and returns the corresponding10// lipgloss.Style.
39 unmodified lines
modified:table/command.go+4 added-4 removed
6 unmodified lines
78 "charm.land/bubbles/v2/help"9 "charm.land/bubbles/v2/table"10 tea "charm.land/bubbletea/v2"11 "charm.land/gum/v2/internal/stdin"12 "charm.land/gum/v2/internal/timeout"13 "charm.land/gum/v2/internal/tty"14 "charm.land/gum/v2/style"15 "charm.land/lipgloss/v2"16 ltable "charm.land/lipgloss/v2/table"13 "github.com/charmbracelet/gum/internal/stdin"14 "github.com/charmbracelet/gum/internal/timeout"15 "github.com/charmbracelet/gum/internal/tty"16 "github.com/charmbracelet/gum/style"17 "golang.org/x/text/encoding"18 "golang.org/x/text/encoding/unicode"19 "golang.org/x/text/transform"20)
161 unmodified lines
modified:table/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options is the customization options for the table command.10type Options struct {
20 unmodified lines
modified:write/command.go+4 added-4 removed
7 unmodified lines
89 "charm.land/bubbles/v2/help"10 "charm.land/bubbles/v2/textarea"11 tea "charm.land/bubbletea/v2"12 "github.com/charmbracelet/gum/cursor"13 "github.com/charmbracelet/gum/internal/stdin"14 "github.com/charmbracelet/gum/internal/timeout"15 "github.com/charmbracelet/gum/style"12 "charm.land/gum/v2/cursor"13 "charm.land/gum/v2/internal/stdin"14 "charm.land/gum/v2/internal/timeout"15 "charm.land/gum/v2/style"16)1718// Run provides a shell script interface for the text area bubble.19// https://github.com/charmbracelet/bubbles/textarea
68 unmodified lines
modified:write/options.go+1 added-1 removed
1 unmodified line
23import (4 "time"56 "github.com/charmbracelet/gum/style"6 "charm.land/gum/v2/style"7)89// Options are the customization options for the textarea.10type Options struct {
26 unmodified lines
modified:go.mod+1 added-1 removed
1module github.com/charmbracelet/gum1module charm.land/gum/v223go 1.25.1345require (
51 unmodified lines
modified:gum.go+16 added-16 removed
1 unmodified line
23import (4 "github.com/alecthomas/kong"56 "github.com/charmbracelet/gum/choose"7 "github.com/charmbracelet/gum/completion"8 "github.com/charmbracelet/gum/confirm"9 "github.com/charmbracelet/gum/file"10 "github.com/charmbracelet/gum/filter"11 "github.com/charmbracelet/gum/format"12 "github.com/charmbracelet/gum/input"13 "github.com/charmbracelet/gum/join"14 "github.com/charmbracelet/gum/log"15 "github.com/charmbracelet/gum/man"16 "github.com/charmbracelet/gum/pager"17 "github.com/charmbracelet/gum/spin"18 "github.com/charmbracelet/gum/style"19 "github.com/charmbracelet/gum/table"20 "github.com/charmbracelet/gum/version"21 "github.com/charmbracelet/gum/write"6 "charm.land/gum/v2/choose"7 "charm.land/gum/v2/completion"8 "charm.land/gum/v2/confirm"9 "charm.land/gum/v2/file"10 "charm.land/gum/v2/filter"11 "charm.land/gum/v2/format"12 "charm.land/gum/v2/input"13 "charm.land/gum/v2/join"14 "charm.land/gum/v2/log"15 "charm.land/gum/v2/man"16 "charm.land/gum/v2/pager"17 "charm.land/gum/v2/spin"18 "charm.land/gum/v2/style"19 "charm.land/gum/v2/table"20 "charm.land/gum/v2/version"21 "charm.land/gum/v2/write"22)2324// Gum is the command-line interface for Gum.25type Gum struct {
203 unmodified lines
modified:main.go+1 added-1 removed
6 unmodified lines
7 "os"8 "runtime/debug"910 tea "charm.land/bubbletea/v2"11 "charm.land/gum/v2/internal/exit"12 "charm.land/lipgloss/v2"13 "github.com/alecthomas/kong"13 "github.com/charmbracelet/gum/internal/exit"14)1516const shaLen = 717
73 unmodified lines
modified:README.md+1 added-1 removed
135 unmodified lines
136137Or just install it with `go`:138139```bash140go install github.com/charmbracelet/gum@latest140go install charm.land/gum/v2@latest141```142143[releases]: https://github.com/charmbracelet/gum/releases144
343 unmodified lines