Versions in this module Expand all Collapse all v1 v1.0.0 Mar 12, 2024 Changes in this version + var LOG = log.LOG + func ActionExecCommand(name string, arg ...string) func(f func(output []byte) Action) Action + func ActionExecCommandE(name string, arg ...string) func(f func(output []byte, err error) Action) Action + func Batch(actions ...Action) batch + func IsCallback() bool + func Test(t interface{ ... }) + type Action struct + func ActionCallback(callback CompletionCallback) Action + func ActionCobra(...) Action + func ActionCommands(cmd *cobra.Command) Action + func ActionDirectories() Action + func ActionExecutables() Action + func ActionExecute(cmd *cobra.Command) Action + func ActionFiles(suffix ...string) Action + func ActionImport(output []byte) Action + func ActionMessage(msg string, args ...interface{}) Action + func ActionMultiParts(sep string, callback func(c Context) Action) Action + func ActionMultiPartsN(sep string, n int, callback func(c Context) Action) Action + func ActionPositional(cmd *cobra.Command) Action + func ActionStyleConfig() Action + func ActionStyledValues(values ...string) Action + func ActionStyledValuesDescribed(values ...string) Action + func ActionStyles(styles ...string) Action + func ActionValues(values ...string) Action + func ActionValuesDescribed(values ...string) Action + func Diff(original, new Action) Action + func (a Action) Cache(timeout time.Duration, keys ...key.Key) Action + func (a Action) Chdir(dir string) Action + func (a Action) ChdirF(f func(tc pkgtraverse.Context) (string, error)) Action + func (a Action) Filter(values ...string) Action + func (a Action) FilterArgs() Action + func (a Action) FilterParts() Action + func (a Action) Invoke(c Context) InvokedAction + func (a Action) List(divider string) Action + func (a Action) MultiParts(dividers ...string) Action + func (a Action) MultiPartsP(delimiter string, pattern string, ...) Action + func (a Action) NoSpace(suffixes ...rune) Action + func (a Action) Prefix(prefix string) Action + func (a Action) Retain(values ...string) Action + func (a Action) Shift(n int) Action + func (a Action) Split() Action + func (a Action) SplitP() Action + func (a Action) Style(s string) Action + func (a Action) StyleF(f func(s string, sc style.Context) string) Action + func (a Action) StyleR(s *string) Action + func (a Action) Suffix(suffix string) Action + func (a Action) Suppress(expr ...string) Action + func (a Action) Tag(tag string) Action + func (a Action) TagF(f func(s string) string) Action + func (a Action) Timeout(d time.Duration, alternative Action) Action + func (a Action) UniqueList(divider string) Action + func (a Action) UniqueListF(divider string, f func(s string) string) Action + func (a Action) Unless(condition func(c Context) bool) Action + func (a Action) Usage(usage string, args ...interface{}) Action + func (a Action) UsageF(f func() string) Action + type ActionMap map[string]Action + type Carapace struct + func Gen(cmd *cobra.Command) *Carapace + func (c Carapace) DashAnyCompletion(action Action) + func (c Carapace) DashCompletion(action ...Action) + func (c Carapace) FlagCompletion(actions ActionMap) + func (c Carapace) PositionalAnyCompletion(action Action) + func (c Carapace) PositionalCompletion(action ...Action) + func (c Carapace) PreInvoke(f func(cmd *cobra.Command, flag *pflag.Flag, action Action) Action) + func (c Carapace) PreRun(f func(cmd *cobra.Command, args []string)) + func (c Carapace) Snippet(name string) (string, error) + func (c Carapace) Standalone() + type CompletionCallback func(c Context) Action + type Context struct + Args []string + Dir string + Env []string + Parts []string + Value string + func NewContext(args ...string) Context + func (c *Context) Setenv(key, value string) + func (c Context) Abs(path string) (string, error) + func (c Context) Command(name string, arg ...string) *execlog.Cmd + func (c Context) Envsubst(s string) (string, error) + func (c Context) Getenv(key string) string + func (c Context) LookupEnv(key string) (string, bool) + type InvokedAction struct + func (ia InvokedAction) Filter(values ...string) InvokedAction + func (ia InvokedAction) Merge(others ...InvokedAction) InvokedAction + func (ia InvokedAction) Prefix(prefix string) InvokedAction + func (ia InvokedAction) Retain(values ...string) InvokedAction + func (ia InvokedAction) Suffix(suffix string) InvokedAction + func (ia InvokedAction) ToA() Action + func (ia InvokedAction) ToMultiPartsA(dividers ...string) Action