Skip to content

Commit

Permalink
fix(subcommands): stops parsing multiple values when subcommands are …
Browse files Browse the repository at this point in the history
…found

Closes #109
  • Loading branch information
kbknapp committed May 6, 2015
1 parent 9944741 commit fc79017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
while let Some(arg) = it.next() {
let arg_slice = &arg[..];
let mut skip = false;
if !pos_only && !arg_slice.starts_with("-") {
if !pos_only && !arg_slice.starts_with("-") && !self.subcommands.contains_key(arg_slice) {
if let Some(nvo) = needs_val_of {
if let Some(ref opt) = self.opts.get(nvo) {
if let Some(ref p_vals) = opt.possible_vals {
Expand Down

0 comments on commit fc79017

Please sign in to comment.