Skip to content

preparse() and postparse() never get called #417

@kotfu

Description

@kotfu

preparse() and postparse() methods exist in cmd2.Cmd and the docstrings say they get called before and after the user input is parsed. Same methods are referenced in hooks.rst. However, these two methods are never called the command processing loop in onecmd_plus_hooks().

We need to either call these methods, or remove them from the code and the documentation.

If we decide to call these methods, we will have to make a decision about when the right time to call preparse(), because on a multiline command, the line can be parsed multiple times.

postparse() would be called at the same place as the existing postparsing_precmd() hook.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions