Mercurial > python-cmd2
diff cmd2.py @ 356:d275d3beceff
fix usage help name-stripping bug
author | catherine@dellzilla |
---|---|
date | Wed, 17 Feb 2010 14:32:04 -0500 |
parents | 5972ae04515e |
children | 4530fc11d743 |
line wrap: on
line diff
--- a/cmd2.py Wed Feb 17 12:32:49 2010 -0500 +++ b/cmd2.py Wed Feb 17 14:32:04 2010 -0500 @@ -120,7 +120,7 @@ optionParser = OptionParser() for opt in option_list: optionParser.add_option(opt) - optionParser.set_usage("%s [options] arg" % func.__name__.strip('do_')) + optionParser.set_usage("%s [options] arg" % func.__name__[3:]) optionParser._func = func def new_func(instance, arg): try: