This commit is contained in:
Kevin K 2015-03-16 18:50:53 -04:00
parent f75e019b5e
commit 6ae91954ae
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "clap"
version = "0.4.3"
version = "0.4.4"
authors = ["Kevin K. <kbknapp@gmail.com>"]
exclude = ["docs/*"]
description = "A Command Line Argument Parser written in Rust"

View file

@ -762,7 +762,7 @@ impl App {
// Single flag, or option long version
needs_val_of = self.parse_long_arg(matches, &arg);
} else if arg_slice.starts_with("-") {
} else if arg_slice.starts_with("-") && arg_slice.len() != 1 {
needs_val_of = self.parse_short_arg(matches, &arg);
} else {
// Positional or Subcommand
@ -774,7 +774,7 @@ impl App {
break;
}
if self.positionals_idx.is_empty() { // || self.positionals_name.is_empty() {
if self.positionals_idx.is_empty() {
self.report_error(
format!("Found positional argument {}, but {} doesn't accept any", arg, self.name),
true, true);