diff options
| author | Eyal Posener <[email protected]> | 2017-05-06 00:25:27 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-06 00:25:27 +0300 |
| commit | 1af7c0b3b7bc0e4bf5605be7e02154a8876cba84 (patch) | |
| tree | bb3220c9de676f16970ffb7c204aa3377194661f /command.go | |
| parent | c8263230e11aa755d3b0b964d4bf7ff296661f5e (diff) | |
Roughly add all go commands
Diffstat (limited to 'command.go')
| -rw-r--r-- | command.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ func (c *Command) options(args []string) (options []Option, only bool) { // if prev has something that needs to follow it, // it is the most relevant completion - if predicate, ok := c.Flags[last(args)]; ok && predicate.Expects { + if predicate, ok := c.Flags[last(args)]; ok && !predicate.ExpectsNothing { return predicate.predict(), true } @@ -40,7 +40,7 @@ func (c *Command) options(args []string) (options []Option, only bool) { } // add additional expected argument of the command - if c.Args.Expects { + if !c.Args.ExpectsNothing { options = append(options, c.Args.predict()...) } |
