Documentation
¶
Overview ¶
Package cmd wires together all mgr subcommands into a urfave/cli app.
Index ¶
Constants ¶
const ( NameLabel = "NAME" VCSLabel = "VCS" RefLabel = "REF" MSGLabel = "MSG" StatusLabel = "STATUS" )
Variables ¶
var ErrReposFailed = errors.New("repos failed")
ErrReposFailed marks a run where the command executed but failed in at least one repo. main maps it to exit code 1 (vs 2 for usage/config errors) and must not re-print it: dispatchSummary already reported the failures on stderr.
Functions ¶
func NewApp ¶
NewApp builds the root CLI application without a "--" tail or config aliases. Callers that execute user argv should use NewAppForArgs.
func NewAppForArgs ¶ added in v0.12.0
NewAppForArgs prepares the app for raw argv: it splits off the verbatim "--" tail (see SplitDashTail) and registers config aliases as top-level commands. The alias load honors -c/--config and is best-effort — config errors are reported later by the command actions. Returns the app and the argv head to pass to Run.
func SplitDashTail ¶ added in v0.12.0
SplitDashTail splits raw argv at the first standalone "--": the head is passed to the CLI parser, the tail is delivered verbatim to commands that spawn subprocesses (git, jj, shell). urfave/cli strips the separator during parsing, which would let repo names inside the command be mistaken for scope; splitting before parsing keeps the tail untouched. The tail is nil when there is no separator. Completion invocations (last arg is the hidden completion flag) pass through unchanged so completion after "--" keeps working.
Types ¶
This section is empty.