imp(Help): default help subcommand string has been shortened

Closes #494
This commit is contained in:
Kevin K 2016-05-05 21:49:48 -04:00
parent dae2d93bdd
commit 5b7fe8e416

View file

@ -819,7 +819,7 @@ impl<'a, 'b> Parser<'a, 'b> where 'a: 'b {
.iter() .iter()
.any(|s| &s.p.meta.name[..] == "help") { .any(|s| &s.p.meta.name[..] == "help") {
debugln!("Building help"); debugln!("Building help");
self.subcommands.push(App::new("help").about("Prints this message or the help message of the given subcommand(s)")); self.subcommands.push(App::new("help").about("Prints this message or the help of the given subcommand(s)"));
} }
} }
@ -866,11 +866,11 @@ impl<'a, 'b> Parser<'a, 'b> where 'a: 'b {
debug!("Checking if -{} is help or version...", arg); debug!("Checking if -{} is help or version...", arg);
if let Some(h) = self.help_short { if let Some(h) = self.help_short {
sdebugln!("Help"); sdebugln!("Help");
if arg == h { try!(self._help()); } if arg == h { try!(self._help()); }
} }
if let Some(v) = self.version_short { if let Some(v) = self.version_short {
sdebugln!("Help"); sdebugln!("Help");
if arg == v { try!(self._version()); } if arg == v { try!(self._version()); }
} }
sdebugln!("Neither"); sdebugln!("Neither");
Ok(()) Ok(())