1
0

make help() available in console

This commit is contained in:
ecdsa
2013-03-04 17:36:49 +01:00
parent 527ba99ef2
commit e16451556e
3 changed files with 19 additions and 26 deletions

View File

@@ -296,4 +296,14 @@ class Commands:
out.append( item )
return out
def help(self, cmd2=None):
if cmd2 not in known_commands:
print_msg("List of commands:", ', '.join(known_commands))
else:
_, _, description, syntax, options_syntax = known_commands[cmd2]
print_msg(description)
if syntax: print_msg("Syntax: " + syntax)
if options_syntax: print_msg("options:\n" + options_syntax)
return None