fix(suggestions): --help and --version now get suggestions

Closes #116
This commit is contained in:
Kevin K 2015-05-12 18:12:14 -04:00
parent f3e2af811e
commit d2b3b1faa0

View file

@ -1648,6 +1648,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
if self.needs_short_help { if self.needs_short_help {
arg.short = Some('h'); arg.short = Some('h');
} }
self.long_list.insert("help");
self.flags.insert("hclap_help", arg); self.flags.insert("hclap_help", arg);
} }
if self.needs_long_version { if self.needs_long_version {
@ -1664,6 +1665,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
if self.needs_short_version { if self.needs_short_version {
arg.short = Some('v'); arg.short = Some('v');
} }
self.long_list.insert("version");
self.flags.insert("vclap_version", arg); self.flags.insert("vclap_version", arg);
} }
if self.needs_subcmd_help && !self.subcommands.is_empty() { if self.needs_subcmd_help && !self.subcommands.is_empty() {