# HG changeset patch # User catherine@bothari # Date 1257563397 18000 # Node ID dfdbd93a2fae46a0601ae6f3dfe954e95c18130c # Parent cd12e4e0fa170cd508d9920ea3305a33eb0ea0fe bugfixes to set diff -r cd12e4e0fa17 -r dfdbd93a2fae cmd2.py --- a/cmd2.py Fri Nov 06 21:41:55 2009 -0500 +++ b/cmd2.py Fri Nov 06 22:09:57 2009 -0500 @@ -854,10 +854,10 @@ as there is no ambiguity. Call without arguments for a list of settable parameters with their values.''' try: - paramName, val = arg.split(None, 1) + statement, paramName, val = arg.parsed.raw.split(None, 2) paramName = paramName.strip().lower() if paramName not in self.settable: - hits = [p for p in self.settable if p.startswith(p)] + hits = [p for p in self.settable if p.startswith(paramName)] if len(hits) == 1: paramName = hits[0] else: diff -r cd12e4e0fa17 -r dfdbd93a2fae example/example.py --- a/example/example.py Fri Nov 06 21:41:55 2009 -0500 +++ b/example/example.py Fri Nov 06 22:09:57 2009 -0500 @@ -7,7 +7,7 @@ multilineCommands = ['orate'] Cmd.shortcuts.update({'&': 'speak'}) maxrepeats = 3 - Cmd.settable.append('maxrepeats Max number of `--repeat` allowed') + Cmd.settable.append('maxrepeats Max number of `--repeat`s allowed') @options([make_option('-p', '--piglatin', action="store_true", help="atinLay"), make_option('-s', '--shout', action="store_true", help="N00B EMULATION MODE"),