diff options
| author | Eyal Posener <[email protected]> | 2017-05-05 23:07:18 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-05 23:07:18 +0300 |
| commit | c8263230e11aa755d3b0b964d4bf7ff296661f5e (patch) | |
| tree | 257d6dfb9218ad536d3b20956b499f2b74ef271c /command.go | |
| parent | 04d16f6064c7c71068f47b4e7106f15a05b6b326 (diff) | |
Add additional args
add predition of directories
add ability for prediction union
Diffstat (limited to 'command.go')
| -rw-r--r-- | command.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -7,6 +7,7 @@ type Flags map[string]Predicate type Command struct { Sub Commands Flags Flags + Args Predicate } // options returns all available complete options for the given command @@ -38,6 +39,11 @@ func (c *Command) options(args []string) (options []Option, only bool) { options = append(options, Arg(flag)) } + // add additional expected argument of the command + if c.Args.Expects { + options = append(options, c.Args.predict()...) + } + return } |
