Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdCompletion *conq.Cmd = &conq.Cmd{ Name: "completion", Run: func(c conq.Ctx) error { line, point, ctype, ok := completionContext() if ok { return doCompletion(c.Com, c.Path[0], line, point, ctype) } // show some installation instructions and exit var pth strings.Builder pth.WriteString(c.Path[0].Name) for _, x := range c.Path[1:] { fmt.Fprintf(&pth, " %s", x.Name) } pth.WriteString(" completion") fmt.Fprintf(c.Out, "complete -C %q %s\n", pth.String(), c.Path[0].Name) return nil }, }
Functions ¶
This section is empty.
Types ¶
type Commander ¶
func (Commander) ResolveCmd ¶
func (c Commander) ResolveCmd(root *conq.Cmd, ctx conq.Ctx) (oc conq.Ctx)
Path should always include the root command and the leaf-command that's being executed
Click to show internal directories.
Click to hide internal directories.