# HG changeset patch # User catherine@dellzilla # Date 1264544624 18000 # Node ID 7d256086fa1b9dc7e5914bd1fbd818621cbb9248 # Parent a94e3b39d78732fd8661b0f15f3896892f21da79 trying to simplify parse results diff -r a94e3b39d787 -r 7d256086fa1b cmd2.py --- 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():