# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1226608859 18000 # Node ID e49ded85ba4cdd4ba475397ad1ad00a99ad589b6 # Parent e2d06e53d09c19c7ac1a05c98e218d1ebe7cfa32 keeping comments in history now diff -r e2d06e53d09c -r e49ded85ba4c cmd2.py --- a/cmd2.py Thu Nov 13 12:41:48 2008 -0500 +++ b/cmd2.py Thu Nov 13 15:40:59 2008 -0500 @@ -26,7 +26,7 @@ """ import cmd, re, os, sys, optparse, subprocess, tempfile, pyparsing, doctest, unittest from optparse import make_option -__version__ = '0.4.2' +__version__ = '0.4.4' class OptionParser(optparse.OptionParser): def exit(self, status=0, msg=None): @@ -244,14 +244,14 @@ ''' if isinstance(s, pyparsing.ParseResults): return s - s = self.commentGrammars.transformString(s) result = (pyparsing.SkipTo(pyparsing.StringEnd()))("fullStatement").parseString(s) + s = self.commentGrammars.transformString(s) command = s.split()[0] if self.caseInsensitive: command = command.lower() result['command'] = command if command in self.noSpecialParse: - result['statement'] = result.fullStatement + result['statement'] = s return result if s[0] in self.shortcuts: @@ -266,10 +266,10 @@ result['unterminated'] = result.before result['parseable'] = result.after else: + result['statement'] = result['unterminated'] = result.before if command in self.multilineCommands: return result # don't bother with the rest, we're still collecting input result += parseSearchResults(self.punctuationPattern, s) - result['statement'] = result['unterminated'] = result.before result += parseSearchResults(self.pipePattern, result.parseable) result += parseSearchResults(self.redirectInPattern, result.parseable) result += parseSearchResults(self.redirectOutPattern, result.parseable) diff -r e2d06e53d09c -r e49ded85ba4c setup.py --- a/setup.py Thu Nov 13 12:41:48 2008 -0500 +++ b/setup.py Thu Nov 13 15:40:59 2008 -0500 @@ -3,7 +3,7 @@ setup( name="cmd2", - version="0.4.2", + version="0.4.4", py_modules=["cmd2",], # metadata for upload to PyPI