From: W. Trevor King Date: Wed, 6 Feb 2013 20:01:17 +0000 (-0500) Subject: ui.cli: Repeat the basic help when the user calls `help` X-Git-Tag: v0.1~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70867506462004149fa9c2cd454181a7988332b0;p=quizzer.git ui.cli: Repeat the basic help when the user calls `help` --- diff --git a/quizzer/ui/cli.py b/quizzer/ui/cli.py index 5938f55..1740e00 100644 --- 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):