changeset 294:e7c89e34b39b

fixed default failure
author catherine@bothari
date Fri, 22 Jan 2010 04:46:15 -0500
parents bbc339f3ddeb
children f5593299fc2a
files cmd2.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Fri Jan 22 04:42:28 2010 -0500
+++ b/cmd2.py	Fri Jan 22 04:46:15 2010 -0500
@@ -728,12 +728,14 @@
                 # "heart" of the command, replaces cmd's onecmd()
                 self.lastcmd = statement.parsed.expanded   
                 funcname = self.func_named(statement.parsed.command)
+                full_statement = ParsedString(statement.parsed.raw)
+                full_statement.parsed = statement.parsed
                 if not funcname:
-                    return self.postparsing_postcmd(self.default(statement))  
+                    return self.postparsing_postcmd(self.default(full_statement))  
                 try:
                     func = getattr(self, funcname)
                 except AttributeError:
-                    return self.postparsing_postcmd(self.default(statement))                  
+                    return self.postparsing_postcmd(self.default(full_statement))                  
                 timestart = datetime.datetime.now()
                 stop = func(statement) 
                 if self.timing: