diff options
| author | Catherine Devlin <catherine.devlin@gmail.com> | 2010-09-21 15:25:56 -0400 |
|---|---|---|
| committer | Catherine Devlin <catherine.devlin@gmail.com> | 2010-09-21 15:25:56 -0400 |
| commit | 999966bb6947d7a26f1a8f33e2f977b18b97d65a (patch) | |
| tree | 7ef9dfb11e5ac3b9e1d62e5771d5e22efcd6a4fb | |
| parent | be835bb6ae17ae2b9e92cd439fb738b0e83ed440 (diff) | |
| download | cmd2-git-999966bb6947d7a26f1a8f33e2f977b18b97d65a.tar.gz | |
added postparse
| -rwxr-xr-x | cmd2.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -702,7 +702,9 @@ class Cmd(cmd.Cmd): def preparse(self, raw, **kwargs): return raw - + def postparse(self, parseResult): + return parseResult + def parsed(self, raw, **kwargs): if isinstance(raw, ParsedString): p = raw @@ -718,6 +720,7 @@ class Cmd(cmd.Cmd): result = self.parser.parseString(s) result['raw'] = raw result['command'] = result.multilineCommand or result.command + result = self.postparse(result) p = ParsedString(result.args) p.parsed = result p.parser = self.parsed |
