# HG changeset patch # User catherine@dellzilla # Date 1235588443 18000 # Node ID 455ebe415d5e17f98bc11f33458e1b0d70bf9828 # Parent 5bf878c5c0e8edad884a1715c3169b515dd5dfb5 do not interpret => as having the redirector > diff -r 5bf878c5c0e8 -r 455ebe415d5e cmd2.py --- a/cmd2.py Wed Feb 18 04:26:55 2009 -0500 +++ b/cmd2.py Wed Feb 25 14:00:43 2009 -0500 @@ -370,7 +370,9 @@ - terminator: ['\n', '\n'] - terminator: ['\n', '\n'] ''' - outputParser = pyparsing.oneOf(['>>','>'])('output') + #outputParser = pyparsing.oneOf(['>>','>'])('output') + outputParser = (pyparsing.Literal('>>') | (pyparsing.WordStart() + '>') | pyparsing.Regex('[^=]>'))('output') + terminatorParser = pyparsing.Or([(hasattr(t, 'parseString') and t) or pyparsing.Literal(t) for t in self.terminators])('terminator') stringEnd = pyparsing.stringEnd ^ '\nEOF' self.multilineCommand = pyparsing.Or([pyparsing.Keyword(c, caseless=self.caseInsensitive) for c in self.multilineCommands])('multilineCommand')