mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
parent
8dd2150aae
commit
bc12e78ead
1 changed files with 6 additions and 1 deletions
|
@ -1296,7 +1296,12 @@ 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("-") && !self.subcommands.contains_key(arg_slice) {
|
||||
let new_arg = if arg_slice.starts_with("-") {
|
||||
if arg_slice.len() == 1 { false } else { true }
|
||||
} else {
|
||||
false
|
||||
};
|
||||
if !pos_only && !new_arg && !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 {
|
||||
|
|
Loading…
Reference in a new issue