From 70867506462004149fa9c2cd454181a7988332b0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 6 Feb 2013 15:01:17 -0500 Subject: [PATCH] ui.cli: Repeat the basic help when the user calls `help` --- quizzer/ui/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) 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): -- 2.26.2