Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFixedSuggestionsToFlag ¶
AddFixedSuggestionsToFlag add fixed suggestions to a flag
func AddSuggestionsToFlag ¶
AddSuggestionsToFlag add fixed suggestions to a flag
func CombineSuggestionsToArgs ¶
func CombineSuggestionsToArgs(fns ...SuggestFn) func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
CombineSuggestionsToArgs combine one or more suggestion resolver functions and call then accordingly with arg count
Types ¶
type ValidArgs ¶
type ValidArgs interface { // IntoUse will return a string with a complete arg use // Example: "{ arg1 | arg2 | arg3 }" IntoUse() string // IntoUse will return a string with the joined options // Example: "arg1 | arg2 | arg3" IntoUseOptions() string // OnlyArgs will return a []string to be used on cobra.Command.ValidArgs OnlyArgs() []string // OnlyArgs will return a []string to be used as result for auto-complete IntoValidArgs() []string }
func EmptySuggestionFuncion ¶
func EmptyValidArgs ¶
func EmptyValidArgs() ValidArgs
EmptyValidArgs returns a ValidArgs with no options
type ValidArgsMap ¶
func (ValidArgsMap) IntoUse ¶
func (va ValidArgsMap) IntoUse() string
func (ValidArgsMap) IntoUseOptions ¶
func (va ValidArgsMap) IntoUseOptions() string
func (ValidArgsMap) IntoValidArgs ¶
func (va ValidArgsMap) IntoValidArgs() []string
func (ValidArgsMap) Long ¶
func (va ValidArgsMap) Long() string
func (ValidArgsMap) OnlyArgs ¶
func (va ValidArgsMap) OnlyArgs() []string
func (ValidArgsMap) Set ¶
func (va ValidArgsMap) Set(k, v string) ValidArgsMap
type ValidArgsSlide ¶
type ValidArgsSlide []string
func (ValidArgsSlide) IntoUse ¶
func (va ValidArgsSlide) IntoUse() string
func (ValidArgsSlide) IntoUseOptions ¶
func (va ValidArgsSlide) IntoUseOptions() string
func (ValidArgsSlide) IntoValidArgs ¶
func (va ValidArgsSlide) IntoValidArgs() []string
func (ValidArgsSlide) OnlyArgs ¶
func (va ValidArgsSlide) OnlyArgs() []string
Click to show internal directories.
Click to hide internal directories.