diff --git a/src/app.rs b/src/app.rs index 165aa170..35e12f78 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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 {