aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 19:18:06 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 19:18:06 +0000
commit8753245bf1430d42c836c1eba4eacd879755c41b (patch)
treebf564199c56663b8e562e2ad8a00efadfd154150
parent2379d4810190fc258ffbfda8571d12f9d2f90545 (diff)
downloadpaludis-8753245bf1430d42c836c1eba4eacd879755c41b.tar.gz
paludis-8753245bf1430d42c836c1eba4eacd879755c41b.tar.xz
Indicate default options in man pages. Fixes: ticket:170
-rw-r--r--paludis/args/man.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/paludis/args/man.cc b/paludis/args/man.cc
index 97cb5cd..129ec19 100644
--- a/paludis/args/man.cc
+++ b/paludis/args/man.cc
@@ -76,19 +76,23 @@ namespace
for (EnumArg::AllowedArgIterator a(e->begin_allowed_args()), a_end(e->end_allowed_args()) ;
a != a_end ; ++a)
{
+ std::string default_string;
+ if (a->first == e->default_arg())
+ default_string = " (default)";
+
switch (mf)
{
case mf_man:
s << ".RS" << endl;
s << ".TP" << endl;
s << ".B \"" << a->first << "\"" << endl;
- s << a->second << endl;
+ s << a->second << default_string << endl;
s << ".RE" << endl;
break;
case mf_html:
s << "<dt>" << a->first << "</dt>" << endl;
- s << "<dd>" << a->second << "</dd>" << endl;
+ s << "<dd>" << a->second << default_string << "</dd>" << endl;
break;
}
}