Skip to content

Commit

Permalink
gum: updates from v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 14, 2025
1 parent 0507059 commit 91b6506
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 4 deletions.
7 changes: 6 additions & 1 deletion completers/gum_completer/cmd/choose.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func init() {
chooseCmd.Flags().Bool("header.underline", false, "Underline text")
chooseCmd.Flags().String("header.width", "", "Text width")
chooseCmd.Flags().String("height", "", "Height of the list")
chooseCmd.Flags().String("input-delimiter", "", "Option delimiter when reading from STDIN")
chooseCmd.Flags().String("item.align", "", "Text Alignment")
chooseCmd.Flags().String("item.background", "", "Background Color")
chooseCmd.Flags().Bool("item.bold", false, "Bold text")
Expand All @@ -64,11 +65,13 @@ func init() {
chooseCmd.Flags().Bool("item.strikethrough", false, "Strikethrough text")
chooseCmd.Flags().Bool("item.underline", false, "Underline text")
chooseCmd.Flags().String("item.width", "", "Text width")
chooseCmd.Flags().String("label-delimiter", "", "Allows to set a delimiter, so options can be set as label:value")
chooseCmd.Flags().String("limit", "", "Maximum number of options to pick")
chooseCmd.Flags().Bool("no-limit", false, "Pick unlimited number of options (ignores limit)")
chooseCmd.Flags().Bool("ordered", false, "Maintain the order of the selected options")
chooseCmd.Flags().String("output-delimiter", "", "Option delimiter when writing to STDOUT")
chooseCmd.Flags().Bool("select-if-one", false, "Select the given option if there is only one")
chooseCmd.Flags().StringSlice("selected", []string{}, "Options that should start as selected")
chooseCmd.Flags().StringSlice("selected", []string{}, "Options that should start as selected (selects all if given '*')")
chooseCmd.Flags().String("selected-prefix", "", "Prefix to show on selected items (hidden if limit is 1)")
chooseCmd.Flags().String("selected.align", "", "Text Alignment")
chooseCmd.Flags().String("selected.background", "", "Background Color")
Expand All @@ -85,6 +88,8 @@ func init() {
chooseCmd.Flags().Bool("selected.strikethrough", false, "Strikethrough text")
chooseCmd.Flags().Bool("selected.underline", false, "Underline text")
chooseCmd.Flags().String("selected.width", "", "Text width")
chooseCmd.Flags().Bool("show-help", false, "Show help keybinds")
chooseCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
chooseCmd.Flags().String("timeout", "", "Timeout until choose returns selected element")
chooseCmd.Flags().String("unselected-prefix", "", "Prefix to show on unselected items (hidden if limit is 1)")
rootCmd.AddCommand(chooseCmd)
Expand Down
2 changes: 2 additions & 0 deletions completers/gum_completer/cmd/confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ func init() {
confirmCmd.Flags().Bool("selected.strikethrough", false, "Strikethrough text")
confirmCmd.Flags().Bool("selected.underline", false, "Underline text")
confirmCmd.Flags().String("selected.width", "", "Text width")
confirmCmd.Flags().Bool("show-help", false, "Show help key binds")
confirmCmd.Flags().Bool("show-output", false, "Print prompt and chosen action to output")
confirmCmd.Flags().String("timeout", "", "Timeout until confirm returns selected value or default if provided")
confirmCmd.Flags().String("unselected.align", "", "Text Alignment")
confirmCmd.Flags().String("unselected.background", "", "Background Color")
Expand Down
19 changes: 19 additions & 0 deletions completers/gum_completer/cmd/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,24 @@ func init() {
fileCmd.Flags().Bool("file.strikethrough", false, "Strikethrough text")
fileCmd.Flags().Bool("file.underline", false, "Underline text")
fileCmd.Flags().String("file.width", "", "Text width")
fileCmd.Flags().String("header", "", "Header value")
fileCmd.Flags().String("header.align", "", "Text Alignment")
fileCmd.Flags().String("header.background", "", "Background Color")
fileCmd.Flags().Bool("header.bold", false, "Bold text")
fileCmd.Flags().String("header.border", "", "Border Style")
fileCmd.Flags().String("header.border-background", "", "Border Background Color")
fileCmd.Flags().String("header.border-foreground", "", "Border Foreground Color")
fileCmd.Flags().Bool("header.faint", false, "Faint text")
fileCmd.Flags().String("header.foreground", "", "Foreground Color")
fileCmd.Flags().String("header.height", "", "Text height")
fileCmd.Flags().Bool("header.italic", false, "Italicize text")
fileCmd.Flags().String("header.margin", "", "Text margin")
fileCmd.Flags().String("header.padding", "", "Text padding")
fileCmd.Flags().Bool("header.strikethrough", false, "Strikethrough text")
fileCmd.Flags().Bool("header.underline", false, "Underline text")
fileCmd.Flags().String("header.width", "", "Text width")
fileCmd.Flags().String("height", "", "Maximum number of files to display")
fileCmd.Flags().BoolP("permissions", "p", false, "Show file permissions")
fileCmd.Flags().String("permissions.align", "", "Text Alignment")
fileCmd.Flags().String("permissions.background", "", "Background Color")
fileCmd.Flags().Bool("permissions.bold", false, "Bold text")
Expand Down Expand Up @@ -110,6 +127,8 @@ func init() {
fileCmd.Flags().Bool("selected.strikethrough", false, "Strikethrough text")
fileCmd.Flags().Bool("selected.underline", false, "Underline text")
fileCmd.Flags().String("selected.width", "", "Text width")
fileCmd.Flags().Bool("show-help", false, "Show help key binds")
fileCmd.Flags().BoolP("size", "s", false, "Show file size")
fileCmd.Flags().String("symlink.align", "", "Text Alignment")
fileCmd.Flags().String("symlink.background", "", "Background Color")
fileCmd.Flags().Bool("symlink.bold", false, "Bold text")
Expand Down
10 changes: 8 additions & 2 deletions completers/gum_completer/cmd/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func init() {
filterCmd.Flags().Bool("cursor-text.strikethrough", false, "Strikethrough text")
filterCmd.Flags().Bool("cursor-text.underline", false, "Underline text")
filterCmd.Flags().String("cursor-text.width", "", "Text width")
filterCmd.Flags().Bool("fuzzy", false, "Enable fuzzy matching")
filterCmd.Flags().Bool("fuzzy", false, "Enable fuzzy matching; otherwise match from start of word")
filterCmd.Flags().Bool("fuzzy-sort", false, "Sort fuzzy results by their scores")
filterCmd.Flags().String("header", "", "Header value")
filterCmd.Flags().String("header.align", "", "Text Alignment")
filterCmd.Flags().String("header.background", "", "Background Color")
Expand Down Expand Up @@ -64,6 +65,7 @@ func init() {
filterCmd.Flags().Bool("indicator.strikethrough", false, "Strikethrough text")
filterCmd.Flags().Bool("indicator.underline", false, "Underline text")
filterCmd.Flags().String("indicator.width", "", "Text width")
filterCmd.Flags().String("input-delimiter", "", "Option delimiter when reading from STDIN")
filterCmd.Flags().String("limit", "", "Maximum number of options to pick")
filterCmd.Flags().String("match.align", "", "Text Alignment")
filterCmd.Flags().String("match.background", "", "Background Color")
Expand All @@ -81,6 +83,7 @@ func init() {
filterCmd.Flags().Bool("match.underline", false, "Underline text")
filterCmd.Flags().String("match.width", "", "Text width")
filterCmd.Flags().Bool("no-limit", false, "Pick unlimited number of options (ignores limit)")
filterCmd.Flags().String("output-delimiter", "", "Option delimiter when writing to STDOUT")
filterCmd.Flags().String("placeholder", "", "Placeholder value")
filterCmd.Flags().String("placeholder.align", "", "Text Alignment")
filterCmd.Flags().String("placeholder.background", "", "Background Color")
Expand Down Expand Up @@ -115,6 +118,7 @@ func init() {
filterCmd.Flags().String("prompt.width", "", "Text width")
filterCmd.Flags().Bool("reverse", false, "Display from the bottom of the screen")
filterCmd.Flags().Bool("select-if-one", false, "Select the given option if there is only one")
filterCmd.Flags().StringSlice("selected", []string{}, "Options that should start as selected (selects all if given '*')")
filterCmd.Flags().String("selected-indicator.align", "", "Text Alignment")
filterCmd.Flags().String("selected-indicator.background", "", "Background Color")
filterCmd.Flags().Bool("selected-indicator.bold", false, "Bold text")
Expand All @@ -131,8 +135,10 @@ func init() {
filterCmd.Flags().Bool("selected-indicator.underline", false, "Underline text")
filterCmd.Flags().String("selected-indicator.width", "", "Text width")
filterCmd.Flags().String("selected-prefix", "", "Character to indicate selected items (hidden if limit is 1)")
filterCmd.Flags().Bool("sort", false, "Sort the results")
filterCmd.Flags().Bool("show-help", false, "Show help keybinds")
filterCmd.Flags().Bool("sort", false, "Sort fuzzy results by their scores")
filterCmd.Flags().Bool("strict", false, "Only returns if anything matched. Otherwise return Filter")
filterCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
filterCmd.Flags().String("text.align", "", "Text Alignment")
filterCmd.Flags().String("text.background", "", "Background Color")
filterCmd.Flags().Bool("text.bold", false, "Bold text")
Expand Down
1 change: 1 addition & 0 deletions completers/gum_completer/cmd/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func init() {
carapace.Gen(formatCmd).Standalone()

formatCmd.Flags().StringP("language", "l", "", "Programming language to parse code")
formatCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
formatCmd.Flags().String("theme", "", "Glamour theme to use for markdown formatting")
formatCmd.Flags().StringP("type", "t", "", "Format to use (markdown,template,code,emoji)")
rootCmd.AddCommand(formatCmd)
Expand Down
2 changes: 2 additions & 0 deletions completers/gum_completer/cmd/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func init() {
inputCmd.Flags().Bool("prompt.strikethrough", false, "Strikethrough text")
inputCmd.Flags().Bool("prompt.underline", false, "Underline text")
inputCmd.Flags().String("prompt.width", "", "Text width")
inputCmd.Flags().Bool("show-help", false, "Show help keybinds")
inputCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
inputCmd.Flags().String("timeout", "", "Timeout until input aborts")
inputCmd.Flags().String("value", "", "Initial value (can also be passed via stdin)")
inputCmd.Flags().String("width", "", "Input width (0 for terminal width)")
Expand Down
1 change: 1 addition & 0 deletions completers/gum_completer/cmd/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func init() {
logCmd.Flags().Bool("message.strikethrough", false, "Strikethrough text")
logCmd.Flags().Bool("message.underline", false, "Underline text")
logCmd.Flags().String("message.width", "", "Text width")
logCmd.Flags().String("min-level", "", "Minimal level to show")
logCmd.Flags().String("prefix", "", "Prefix to print before the message")
logCmd.Flags().String("prefix.align", "", "Text Alignment")
logCmd.Flags().String("prefix.background", "", "Background Color")
Expand Down
4 changes: 3 additions & 1 deletion completers/gum_completer/cmd/spin.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ func init() {

spinCmd.Flags().StringP("align", "a", "", "Alignment of spinner with regard to the title")
spinCmd.Flags().Bool("show-error", false, "Show output of command only if the command fails")
spinCmd.Flags().Bool("show-output", false, "Show or pipe output of command during execution")
spinCmd.Flags().Bool("show-output", false, "Show or pipe output of command during execution (shows both STDOUT and STDERR)")
spinCmd.Flags().Bool("show-stderr", false, "Show STDERR errput")
spinCmd.Flags().Bool("show-stdout", false, "Show STDOUT output")
spinCmd.Flags().StringP("spinner", "s", "", "Spinner type")
spinCmd.Flags().String("spinner.align", "", "Text Alignment")
spinCmd.Flags().String("spinner.background", "", "Background Color")
Expand Down
2 changes: 2 additions & 0 deletions completers/gum_completer/cmd/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ func init() {
styleCmd.Flags().String("margin", "", "Text margin")
styleCmd.Flags().String("padding", "", "Text padding")
styleCmd.Flags().Bool("strikethrough", false, "Strikethrough text")
styleCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
styleCmd.Flags().Bool("trim", false, "Trim whitespaces on every input line")
styleCmd.Flags().Bool("underline", false, "Underline text")
styleCmd.Flags().String("width", "", "Text width")
rootCmd.AddCommand(styleCmd)
Expand Down
5 changes: 5 additions & 0 deletions completers/gum_completer/cmd/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func init() {
tableCmd.Flags().Bool("cell.underline", false, "Underline text")
tableCmd.Flags().String("cell.width", "", "Text width")
tableCmd.Flags().StringSliceP("columns", "c", []string{}, "Column names")
tableCmd.Flags().String("fields-per-record", "", "Sets the number of expected fields per record")
tableCmd.Flags().StringP("file", "f", "", "file path")
tableCmd.Flags().String("header.align", "", "Text Alignment")
tableCmd.Flags().String("header.background", "", "Background Color")
Expand All @@ -64,7 +65,9 @@ func init() {
tableCmd.Flags().Bool("header.underline", false, "Underline text")
tableCmd.Flags().String("header.width", "", "Text width")
tableCmd.Flags().String("height", "", "Table height")
tableCmd.Flags().Bool("lazy-quotes", false, "If LazyQuotes is true, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field")
tableCmd.Flags().BoolP("print", "p", false, "static print")
tableCmd.Flags().StringP("return-column", "r", "", "Which column number should be returned instead of whole row as string. Default=0 returns whole Row")
tableCmd.Flags().String("selected.align", "", "Text Alignment")
tableCmd.Flags().String("selected.background", "", "Background Color")
tableCmd.Flags().Bool("selected.bold", false, "Bold text")
Expand All @@ -81,6 +84,8 @@ func init() {
tableCmd.Flags().Bool("selected.underline", false, "Underline text")
tableCmd.Flags().String("selected.width", "", "Text width")
tableCmd.Flags().StringP("separator", "s", "", "Row separator")
tableCmd.Flags().Bool("show-help", false, "Show help keybinds")
tableCmd.Flags().String("timeout", "", "Timeout until choose returns selected element")
tableCmd.Flags().StringSliceP("widths", "w", []string{}, "Column widths")
rootCmd.AddCommand(tableCmd)

Expand Down
18 changes: 18 additions & 0 deletions completers/gum_completer/cmd/versionCheck.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var versionCheckCmd = &cobra.Command{
Use: "version-check",
Short: "Semver check current gum version",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(versionCheckCmd).Standalone()

rootCmd.AddCommand(versionCheckCmd)
}
4 changes: 4 additions & 0 deletions completers/gum_completer/cmd/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ func init() {
writeCmd.Flags().Bool("line-number.strikethrough", false, "Strikethrough text")
writeCmd.Flags().Bool("line-number.underline", false, "Underline text")
writeCmd.Flags().String("line-number.width", "", "Text width")
writeCmd.Flags().String("max-lines", "", "Maximum number of lines (0 for no limit)")
writeCmd.Flags().String("placeholder", "", "Placeholder value")
writeCmd.Flags().String("placeholder.align", "", "Text Alignment")
writeCmd.Flags().String("placeholder.background", "", "Background Color")
Expand Down Expand Up @@ -157,7 +158,10 @@ func init() {
writeCmd.Flags().Bool("prompt.underline", false, "Underline text")
writeCmd.Flags().String("prompt.width", "", "Text width")
writeCmd.Flags().Bool("show-cursor-line", false, "Show cursor line")
writeCmd.Flags().Bool("show-help", false, "Show help key binds")
writeCmd.Flags().Bool("show-line-numbers", false, "Show line numbers")
writeCmd.Flags().Bool("strip-ansi", false, "Strip ANSI sequences when reading from STDIN")
writeCmd.Flags().String("timeout", "", "Timeout until choose returns selected element")
writeCmd.Flags().String("value", "", "Initial value (can be passed via stdin)")
writeCmd.Flags().String("width", "", "Text area width (0 for terminal width)")
rootCmd.AddCommand(writeCmd)
Expand Down

0 comments on commit 91b6506

Please sign in to comment.