summaryrefslogtreecommitdiff
path: root/i/marvin/src/interpreter
diff options
context:
space:
mode:
Diffstat (limited to 'i/marvin/src/interpreter')
-rw-r--r--i/marvin/src/interpreter/interpreter.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/i/marvin/src/interpreter/interpreter.cc b/i/marvin/src/interpreter/interpreter.cc
index 0c067cf..a160002 100644
--- a/i/marvin/src/interpreter/interpreter.cc
+++ b/i/marvin/src/interpreter/interpreter.cc
@@ -97,14 +97,19 @@ Interpreter::help (void) const
std::string ret;
for (Funcs::const_iterator i = funcs_.begin (); i != funcs_.end (); ++i)
{
- // Well, if you really want to implement this better, please do...
- for (std::string::const_iterator j = i->second.desc.begin ();
- j != i->second.desc.end (); j++)
+ ret += i->first;
+ if (!i->second.desc.empty ())
{
- if (*j == '\n')
- ret += "\n ";
- else
- ret += *j;
+ ret += " : ";
+ // Well, if you really want to implement this better, please do...
+ for (std::string::const_iterator j = i->second.desc.begin ();
+ j != i->second.desc.end (); j++)
+ {
+ if (*j == '\n')
+ ret += "\n ";
+ else
+ ret += *j;
+ }
}
ret += '\n';
}