Permalink
Browse files

Prettify the man page version output

(cherry picked from commit 10e1237)
  • Loading branch information...
peternewman committed Aug 16, 2018
1 parent cb021b4 commit cf7260732cd0469c19cc4a43bbacc47464d8b758
Showing with 9 additions and 2 deletions.
  1. +9 −2 common/base/Flags.cpp
@@ -358,8 +358,15 @@ void FlagRegistry::GenManPage() {
str << " <" << flag->arg_type() << ">";
}
if (flag->short_opt()) {
short_flag_lines.push_back(
OptionPair(str.str(), iter->second->help()));
if (flag->name() == FLAGS_version.name()) {
std::ostringstream help_str;
help_str << "Print\n.B " << exe_name << "\nversion information.";
short_flag_lines.push_back(
OptionPair(str.str(), help_str.str()));
} else {
short_flag_lines.push_back(
OptionPair(str.str(), iter->second->help()));
}
} else {
long_flag_lines.push_back(
OptionPair(str.str(), iter->second->help()));

0 comments on commit cf72607

Please sign in to comment.