Documentation ¶
Overview ¶
Pacakge carapace provides multi-shell completion script generation for spf13/cobra
Index ¶
- Variables
- func IsCallback() bool
- type Action
- func ActionBool() Action
- func ActionCallback(callback CompletionCallback) Action
- func ActionDirectories() Action
- func ActionFiles(suffix string) Action
- func ActionMessage(msg string) Action
- func ActionMultiParts(divider string, callback func(args []string, parts []string) Action) Action
- func ActionValues(values ...string) Action
- func ActionValuesDescribed(values ...string) Action
- type ActionMap
- type Carapace
- type CompletionCallback
- type Completions
- type InvokedAction
- func (a InvokedAction) Filter(values []string) InvokedAction
- func (a InvokedAction) Merge(others ...InvokedAction) InvokedAction
- func (a InvokedAction) Prefix(prefix string) InvokedAction
- func (a InvokedAction) Suffix(suffix string) InvokedAction
- func (a InvokedAction) ToA() Action
- func (a InvokedAction) ToMultipartsA(divider string) Action
Constants ¶
This section is empty.
Variables ¶
View Source
var CallbackValue string
CCallbackValue is set to the currently completed flag/positional value during callback
Functions ¶
func IsCallback ¶ added in v0.0.6
func IsCallback() bool
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
func ActionCallback ¶
func ActionCallback(callback CompletionCallback) Action
ActionCallback invokes a go function during completion
func ActionDirectories ¶ added in v0.0.11
func ActionDirectories() Action
func ActionFiles ¶
func ActionMessage ¶
ActionMessage displays a help messages in places where no completions can be generated
func ActionMultiParts ¶
ActionMultiParts completes multiple parts of words separately where each part is separated by some char
func ActionValues ¶
ActionValues completes arbitrary keywords (values)
func ActionValuesDescribed ¶
ActionValuesDescribed completes arbitrary key (values) with an additional description (value, description pairs)
func (Action) Invoke ¶ added in v0.1.1
func (a Action) Invoke(args []string) InvokedAction
type Carapace ¶
type Carapace struct {
// contains filtered or unexported fields
}
func (Carapace) FlagCompletion ¶
func (Carapace) PositionalAnyCompletion ¶ added in v0.0.14
func (Carapace) PositionalCompletion ¶
func (Carapace) Standalone ¶ added in v0.0.14
func (c Carapace) Standalone()
type CompletionCallback ¶
type Completions ¶
type Completions struct {
// contains filtered or unexported fields
}
type InvokedAction ¶ added in v0.1.1
type InvokedAction Action
func (InvokedAction) Filter ¶ added in v0.1.1
func (a InvokedAction) Filter(values []string) InvokedAction
func (InvokedAction) Merge ¶ added in v0.1.8
func (a InvokedAction) Merge(others ...InvokedAction) InvokedAction
func (InvokedAction) Prefix ¶ added in v0.1.1
func (a InvokedAction) Prefix(prefix string) InvokedAction
func (InvokedAction) Suffix ¶ added in v0.1.1
func (a InvokedAction) Suffix(suffix string) InvokedAction
func (InvokedAction) ToA ¶ added in v0.1.1
func (a InvokedAction) ToA() Action
func (InvokedAction) ToMultipartsA ¶ added in v0.1.3
func (a InvokedAction) ToMultipartsA(divider string) Action
Click to show internal directories.
Click to hide internal directories.