changeset 299:7d256086fa1b

trying to simplify parse results
author catherine@dellzilla
date Tue, 26 Jan 2010 17:23:44 -0500
parents a94e3b39d787
children 1e4773b325d1
files cmd2.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Mon Jan 25 10:05:51 2010 -0500
+++ b/cmd2.py	Tue Jan 26 17:23:44 2010 -0500
@@ -131,6 +131,7 @@
             if hasattr(opts, '_exit'):
                 return None
             if hasattr(arg, 'parsed'):
+                arg.parsed.args = newArgs
                 terminator = arg.parsed.terminator
                 try:
                     if arg.parsed.terminator[0] == '\n':
@@ -640,9 +641,9 @@
             result = self.parser.parseString(s)
             result['command'] = result.multilineCommand or result.command        
             result['raw'] = raw
-            result['clean'] = self.commentGrammars.transformString(result.args)  # oh no, strips ls box/*
+            result['comments_removed'] = self.commentGrammars.transformString(result.args)  
             result['expanded'] = s        
-            p = ParsedString(result.clean)
+            p = ParsedString(result.comments_removed)
             p.parsed = result
             p.parser = self.parsed
         for (key, val) in kwargs.items():