diff options
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 } |
