summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2010-09-21 15:25:56 -0400
committerCatherine Devlin <catherine.devlin@gmail.com>2010-09-21 15:25:56 -0400
commit999966bb6947d7a26f1a8f33e2f977b18b97d65a (patch)
tree7ef9dfb11e5ac3b9e1d62e5771d5e22efcd6a4fb
parentbe835bb6ae17ae2b9e92cd439fb738b0e83ed440 (diff)
downloadcmd2-git-999966bb6947d7a26f1a8f33e2f977b18b97d65a.tar.gz
added postparse
-rwxr-xr-xcmd2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 6cfc9e5a..5e8209ce 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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