comparison cmd2.py @ 201:6cdf53ce84f5

unknown
author catherine@Elli.myhome.westell.com
date Mon, 02 Mar 2009 06:38:51 -0500
parents 05c0e28306d3
children da8c265934ee
comparison
equal deleted inserted replaced
200:05c0e28306d3 201:6cdf53ce84f5
426 if isinstance(raw, ParsedString): 426 if isinstance(raw, ParsedString):
427 p = raw 427 p = raw
428 else: 428 else:
429 s = self.inputParser.transformString(raw.lstrip()) 429 s = self.inputParser.transformString(raw.lstrip())
430 for (shortcut, expansion) in self.shortcuts.items(): 430 for (shortcut, expansion) in self.shortcuts.items():
431 if s.startswith(shortcut): 431 if s.lower().startswith(shortcut):
432 s = s.replace(shortcut, expansion + ' ', 1) 432 s = s.replace(shortcut, expansion + ' ', 1)
433 break 433 break
434 result = self.parser.parseString(s) 434 result = self.parser.parseString(s)
435 result['command'] = result.multilineCommand or result.command 435 result['command'] = result.multilineCommand or result.command
436 result['raw'] = raw 436 result['raw'] = raw