Mercurial > python-cmd2
changeset 74:4e290d75e92e
ugh, big new refactoring: split out UserCommand
author | catherine@Elli.myhome.westell.com |
---|---|
date | Wed, 25 Jun 2008 17:16:07 -0400 |
parents | 101283b63e1b |
children | 8b2603d1acc1 |
files | cmd2.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cmd2.py Wed Jun 25 17:09:59 2008 -0400 +++ b/cmd2.py Wed Jun 25 17:16:07 2008 -0400 @@ -163,6 +163,12 @@ return None return parser +class UserCommand(str): + def __init__(self, s): + str.__init__(self, s) + self.executable = s + self.searchable = s + class Cmd(cmd.Cmd): caseInsensitive = True terminators = [';', pyparsing.LineEnd() + pyparsing.LineEnd()]