summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/cmd2.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 012b6f6b..3af6b5e6 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -394,10 +394,6 @@ class Cmd(cmd.Cmd):
# Call super class constructor
super().__init__(completekey=completekey, stdin=stdin, stdout=stdout)
- # Get rid of cmd's complete_help() functions so AutoCompleter will complete our help command
- if getattr(cmd.Cmd, 'complete_help', None) is not None:
- delattr(cmd.Cmd, 'complete_help')
-
# Commands to exclude from the help menu and tab completion
self.hidden_commands = ['eof', 'eos', '_relative_load']
@@ -2584,6 +2580,10 @@ class Cmd(cmd.Cmd):
help_parser.add_argument('-v', '--verbose', action='store_true',
help="print a list of all commands with descriptions of each")
+ # Get rid of cmd's complete_help() functions so AutoCompleter will complete the help command
+ if getattr(cmd.Cmd, 'complete_help', None) is not None:
+ delattr(cmd.Cmd, 'complete_help')
+
@with_argparser(help_parser)
def do_help(self, args: argparse.Namespace) -> None:
"""List available commands or provide detailed help for a specific command"""