diff --git a/completers/gum_completer/cmd/choose.go b/completers/gum_completer/cmd/choose.go index 1de16919b3..da5ac09a44 100644 --- a/completers/gum_completer/cmd/choose.go +++ b/completers/gum_completer/cmd/choose.go @@ -67,6 +67,7 @@ func init() { 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().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().String("selected-prefix", "", "Prefix to show on selected items (hidden if limit is 1)") chooseCmd.Flags().String("selected.align", "", "Text Alignment") diff --git a/completers/gum_completer/cmd/filter.go b/completers/gum_completer/cmd/filter.go index d1e79fe2cf..df004ec053 100644 --- a/completers/gum_completer/cmd/filter.go +++ b/completers/gum_completer/cmd/filter.go @@ -99,6 +99,7 @@ func init() { filterCmd.Flags().Bool("prompt.underline", false, "Underline text") 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().String("selected-indicator.align", "", "Text Alignment") filterCmd.Flags().String("selected-indicator.background", "", "Background Color") filterCmd.Flags().Bool("selected-indicator.bold", false, "Bold text")