# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1214428567 14400 # Node ID 4e290d75e92e99ce64651aa16491ea4e958c8800 # Parent 101283b63e1b159755491f09f67d401185c9b673 ugh, big new refactoring: split out UserCommand diff -r 101283b63e1b -r 4e290d75e92e cmd2.py --- 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()]