mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
imp(Help): default help subcommand string has been shortened
Closes #494
This commit is contained in:
parent
dae2d93bdd
commit
5b7fe8e416
1 changed files with 3 additions and 3 deletions
|
@ -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(())
|
||||||
|
|
Loading…
Reference in a new issue