Skip to content

Commit

Permalink
Merge pull request #1162 from da-x/nesting-of-dash-dash
Browse files Browse the repository at this point in the history
Allow nesting of '--'
  • Loading branch information
kbknapp authored Feb 4, 2018
2 parents d29100f + 73993fe commit 8ff685e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,9 @@ where
self.unset(AS::ValidNegNumFound);
// Is this a new argument, or values from a previous option?
let starts_new_arg = self.is_new_arg(&arg_os, needs_val_of);
if arg_os.starts_with(b"--") && arg_os.len_() == 2 && starts_new_arg {
if !self.is_set(AS::TrailingValues) &&
arg_os.starts_with(b"--") && arg_os.len_() == 2 && starts_new_arg
{
debugln!("Parser::get_matches_with: setting TrailingVals=true");
self.set(AS::TrailingValues);
continue;
Expand Down

0 comments on commit 8ff685e

Please sign in to comment.