Documentation ¶
Index ¶
Constants ¶
View Source
const (
ETX = 0x3 // control-C
)
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
add cobra command to given parent(s) and returns given command
func FilterCompletions ¶
func FilterCompletions(list []string, toComplete string, directive *cobra.ShellCompDirective, help string) []string
filter all strings starting with string to complete
Types ¶
type ValidateFn ¶
type ValidateFn = func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
func AppendHelp ¶
func AppendHelp(helpTxt string) ValidateFn
add active help text for argument, and show if argument is empty
func AppendLastHelp ¶
func AppendLastHelp(total int, helpTxt string) ValidateFn
add active help text shown when last valid argument is already entered
func ValidateArguments ¶
func ValidateArguments(fns ...ValidateFn) ValidateFn
execute completion commands per argument
Click to show internal directories.
Click to hide internal directories.