# HG changeset patch # User catherine@localhost # Date 1210869721 14400 # Node ID b636cb71592513ec35ec5eb8569cbc6005d6ee36 # Parent 34107b79c840213642db375dccd168bfec96a76b tested diff -r 34107b79c840 -r b636cb715925 cmd2.py --- a/cmd2.py Thu May 15 12:25:09 2008 -0400 +++ b/cmd2.py Thu May 15 12:42:01 2008 -0400 @@ -43,8 +43,8 @@ optionParser = OptionParser() for opt in option_list: optionParser.add_option(opt) + optionParser.set_usage("%s [options] arg" % func.__name__.strip('do_')) def newFunc(instance, arg): - optionParser.set_usage("%s [options] arg" % func.__name__) try: opts, arg = optionParser.parse_args(arg.split()) except optparse.OptionValueError, e: