Skip to content

Commit

Permalink
fix(suggestions): --help and --version now get suggestions
Browse files Browse the repository at this point in the history
Closes #116
  • Loading branch information
kbknapp committed May 12, 2015
1 parent f3e2af8 commit d2b3b1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
if self.needs_short_help {
arg.short = Some('h');
}
self.long_list.insert("help");
self.flags.insert("hclap_help", arg);
}
if self.needs_long_version {
Expand All @@ -1664,6 +1665,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
if self.needs_short_version {
arg.short = Some('v');
}
self.long_list.insert("version");
self.flags.insert("vclap_version", arg);
}
if self.needs_subcmd_help && !self.subcommands.is_empty() {
Expand Down

0 comments on commit d2b3b1f

Please sign in to comment.