Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCmd ¶
RegisterCmd for custom completion logic
The default completion resolves sub-command names (if any), valid args, or filenames. This can override that with something more fitting.
Ideally this would be scoped to a single Completer, but it's inconvenient for all command "factories" to share that value around. The registered values are unique pointers so overwriting won't happen.
func RegisterFlag ¶
RegisterFlag for custom completion logic
The default completion type resolves filenames. This can override that with something more fitting.
Ideally this would be scoped to a single Completer, but it's inconvenient for all command "factories" to share that value around. The registered values are unique pointers so overwriting won't happen.
Types ¶
type Completer ¶
type Completer struct {
// contains filtered or unexported fields
}
Completer is aware of Cobra CLI semantics, and can generate a tab completion skeleton for them.
func (*Completer) Command ¶
Command traversed the *cobra.Command to create a completion skeleton, substituting registered predictors in their appropriate places