Documentation ¶
Index ¶
- func AddFixedSuggestionsToFlag(cmd *cobra.Command, flagName string, va ValidArgs) error
- func AddSuggestionsToFlag(cmd *cobra.Command, flagName string, suggestFn suggestFn) error
- func CombineSuggestionsToArgs(fns ...suggestFn) ...
- func GenZshCompletion(cmd *cobra.Command, w io.Writer) error
- type ValidArgs
- type ValigsArgsMap
- type ValigsArgsSlide
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 ¶
func EmptySuggestionFuncion ¶
func EmptyValidArgs ¶
func EmptyValidArgs() ValidArgs
EmptyValidArgs returns a ValidArgs with no options
type ValigsArgsMap ¶
func (ValigsArgsMap) IntoUse ¶
func (va ValigsArgsMap) IntoUse() string
func (ValigsArgsMap) IntoValidArgs ¶
func (va ValigsArgsMap) IntoValidArgs() []string
func (ValigsArgsMap) OnlyArgs ¶
func (va ValigsArgsMap) OnlyArgs() []string
func (ValigsArgsMap) Set ¶
func (va ValigsArgsMap) Set(k, v string) ValigsArgsMap
type ValigsArgsSlide ¶
type ValigsArgsSlide []string
func (ValigsArgsSlide) IntoUse ¶
func (va ValigsArgsSlide) IntoUse() string
func (ValigsArgsSlide) IntoValidArgs ¶
func (va ValigsArgsSlide) IntoValidArgs() []string
func (ValigsArgsSlide) OnlyArgs ¶
func (va ValigsArgsSlide) OnlyArgs() []string
Click to show internal directories.
Click to hide internal directories.