Mercurial > python-cmd2
changeset 210:3f8fac776845
end wed
author | catherine@dellzilla |
---|---|
date | Tue, 10 Mar 2009 16:42:06 -0400 |
parents | 6dc79bf15fc6 |
children | 5da7d72e72ee |
files | cmd2.py |
diffstat | 1 files changed, 0 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Tue Mar 10 09:48:04 2009 -0400 +++ b/cmd2.py Tue Mar 10 16:42:06 2009 -0400 @@ -482,12 +482,10 @@ p = raw else: s = self.inputParser.transformString(raw.lstrip()) - ''' for (shortcut, expansion) in self.shortcuts.items(): if s.lower().startswith(shortcut): s = s.replace(shortcut, expansion + ' ', 1) break - ''' result = self.parser.parseString(s) result['command'] = result.multilineCommand or result.command result['raw'] = raw @@ -514,10 +512,6 @@ """ if not line: return self.emptyline() - for (shortcut, expansion) in self.shortcuts.items(): - if line.lower().lstrip().startswith(shortcut): - line = line.replace(shortcut, expansion + ' ', 1) - break if not pyparsing.Or(self.commentGrammars).setParseAction(lambda x: '').transformString(line): return 0 # command was empty except for comments try: