Parse invocation flags across command discovery
This commit is contained in:
@@ -16,9 +16,10 @@ type Command struct {
|
||||
Runnable bool
|
||||
Flags []Flag
|
||||
// CoreFlags are parsed by CommandKit but do not occupy consumer binding indexes.
|
||||
CoreFlags []Flag
|
||||
Arguments []Argument
|
||||
Children []*Command
|
||||
CoreFlags []Flag
|
||||
InvocationFlags []Flag
|
||||
Arguments []Argument
|
||||
Children []*Command
|
||||
}
|
||||
|
||||
// Argument describes one positional input for usage rendering.
|
||||
@@ -196,15 +197,17 @@ type ReportingSelection struct {
|
||||
|
||||
// Result contains the selected command and raw input collected by the adapter.
|
||||
type Result struct {
|
||||
Key Key
|
||||
Path []string
|
||||
HelpRequested bool
|
||||
FlagValues [][]string
|
||||
FlagSpellings [][]string
|
||||
FlagOccurrences []FlagOccurrence
|
||||
Reporting ReportingSelection
|
||||
Operands []string
|
||||
Failure *Failure
|
||||
Key Key
|
||||
Path []string
|
||||
HelpRequested bool
|
||||
FlagValues [][]string
|
||||
FlagSpellings [][]string
|
||||
InvocationFlagValues [][]string
|
||||
InvocationFlagSpellings [][]string
|
||||
FlagOccurrences []FlagOccurrence
|
||||
Reporting ReportingSelection
|
||||
Operands []string
|
||||
Failure *Failure
|
||||
}
|
||||
|
||||
// ParseOptions selects flag aliases for parser contexts.
|
||||
|
||||
Reference in New Issue
Block a user