@@ -394,10 +394,6 @@ def __init__(self, completekey: str='tab', stdin=None, stdout=None, persistent_h
394394 # Call super class constructor
395395 super ().__init__ (completekey = completekey , stdin = stdin , stdout = stdout )
396396
397- # Get rid of cmd's complete_help() functions so AutoCompleter will complete our help command
398- if getattr (cmd .Cmd , 'complete_help' , None ) is not None :
399- delattr (cmd .Cmd , 'complete_help' )
400-
401397 # Commands to exclude from the help menu and tab completion
402398 self .hidden_commands = ['eof' , 'eos' , '_relative_load' ]
403399
@@ -2584,6 +2580,10 @@ def complete_help_subcommand(self, text: str, line: str, begidx: int, endidx: in
25842580 help_parser .add_argument ('-v' , '--verbose' , action = 'store_true' ,
25852581 help = "print a list of all commands with descriptions of each" )
25862582
2583+ # Get rid of cmd's complete_help() functions so AutoCompleter will complete the help command
2584+ if getattr (cmd .Cmd , 'complete_help' , None ) is not None :
2585+ delattr (cmd .Cmd , 'complete_help' )
2586+
25872587 @with_argparser (help_parser )
25882588 def do_help (self , args : argparse .Namespace ) -> None :
25892589 """List available commands or provide detailed help for a specific command"""
0 commit comments