@@ -1341,7 +1341,8 @@ def ppaged(self, msg: Any, *, end: str = '\n', chop: bool = False) -> None:
13411341 # ----- Methods related to tab completion -----
13421342
13431343 def _reset_completion_defaults (self ) -> None :
1344- """Resets tab completion settings
1344+ """Reset tab completion settings.
1345+
13451346 Needs to be called each time readline runs tab completion.
13461347 """
13471348 self .allow_appended_space = True
@@ -2406,47 +2407,43 @@ def _raise_keyboard_interrupt(self) -> None:
24062407 raise KeyboardInterrupt ("Got a keyboard interrupt" )
24072408
24082409 def precmd (self , statement : Union [Statement , str ]) -> Statement :
2409- """Hook method executed just before the command is executed by
2410- [cmd2.Cmd.onecmd][] and after adding it to history.
2410+ """Ran just before the command is executed by [cmd2.Cmd.onecmd][] and after adding it to history (cmd Hook method).
24112411
24122412 :param statement: subclass of str which also contains the parsed input
24132413 :return: a potentially modified version of the input Statement object
24142414
2415- See [cmd2.Cmd.register_postparsing_hook][] and
2416- [cmd2.Cmd.register_precmd_hook][] for more robust ways
2417- to run hooks before the command is executed. See
2418- [Hooks](../features/hooks.md) for more information.
2415+ See [cmd2.Cmd.register_postparsing_hook][] and [cmd2.Cmd.register_precmd_hook][] for more robust ways
2416+ to run hooks before the command is executed. See [Hooks](../features/hooks.md) for more information.
24192417 """
24202418 return Statement (statement ) if not isinstance (statement , Statement ) else statement
24212419
24222420 def postcmd (self , stop : bool , statement : Union [Statement , str ]) -> bool : # noqa: ARG002
2423- """Hook method executed just after a command is executed by
2424- [cmd2.Cmd.onecmd][].
2421+ """Ran just after a command is executed by [cmd2.Cmd.onecmd][] (cmd inherited Hook method).
24252422
24262423 :param stop: return `True` to request the command loop terminate
24272424 :param statement: subclass of str which also contains the parsed input
24282425
24292426 See [cmd2.Cmd.register_postcmd_hook][] and [cmd2.Cmd.register_cmdfinalization_hook][] for more robust ways
2430- to run hooks after the command is executed. See
2431- [Hooks](../features/hooks.md) for more information.
2427+ to run hooks after the command is executed. See [Hooks](../features/hooks.md) for more information.
24322428 """
24332429 return stop
24342430
24352431 def preloop (self ) -> None :
2436- """Hook method executed once when the [cmd2.Cmd.cmdloop][]
2437- method is called.
2432+ """Ran once when the [cmd2.Cmd.cmdloop][] method is called (cmd inherited Hook method).
2433+
2434+ This method is a stub that does nothing and exists to be overridden by subclasses.
24382435
2439- See [cmd2.Cmd.register_preloop_hook][] for a more robust way
2440- to run hooks before the command loop begins. See
2441- [Hooks](../features/hooks.md) for more information.
2436+ See [cmd2.Cmd.register_preloop_hook][] for a more robust wayto run hooks before the command loop begins.
2437+ See [Hooks](../features/hooks.md) for more information.
24422438 """
24432439
24442440 def postloop (self ) -> None :
2445- """Hook method executed once when the [cmd2.Cmd.cmdloop][] method is about to return.
2441+ """Ran once when the [cmd2.Cmd.cmdloop][] method is about to return (cmd inherited Hook Method).
2442+
2443+ This method is a stub that does nothing and exists to be overridden by subclasses.
24462444
2447- See [cmd2.Cmd.register_postloop_hook][] for a more robust way
2448- to run hooks after the command loop completes. See
2449- [Hooks](../features/hooks.md) for more information.
2445+ See [cmd2.Cmd.register_postloop_hook][] for a more robust way to run hooks after the command loop completes.
2446+ See [Hooks](../features/hooks.md) for more information.
24502447 """
24512448
24522449 def parseline (self , line : str ) -> tuple [str , str , str ]:
0 commit comments