projects
/
quizzer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b67fd82
)
ui.cli: Repeat the basic help when the user calls `help`
author
W. Trevor King
<wking@tremily.us>
Wed, 6 Feb 2013 20:01:17 +0000
(15:01 -0500)
committer
W. Trevor King
<wking@tremily.us>
Wed, 6 Feb 2013 20:04:12 +0000
(15:04 -0500)
quizzer/ui/cli.py
patch
|
blob
|
history
diff --git
a/quizzer/ui/cli.py
b/quizzer/ui/cli.py
index 5938f5505599e7f748180967bc0c3dcffe7c3ebd..1740e001628d4d5a3eff56e888b136cdf4bc0239 100644
(file)
--- a/
quizzer/ui/cli.py
+++ b/
quizzer/ui/cli.py
@@
-88,6
+88,12
@@
class QuestionCommandLine (_cmd.Cmd):
self._reset()
print(self.question.format_help())
+ def do_help(self, arg):
+ 'List available commands with "help" or detailed help with "help cmd"'
+ if not arg:
+ print('\n'.join(self._help))
+ super(QuestionCommandLine, self).do_help(arg)
+
class CommandLineInterface (UserInterface):
def run(self):