summaryrefslogtreecommitdiff
path: root/examples/cmd_as_argument.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-06 18:20:50 -0500
committerGitHub <noreply@github.com>2020-02-06 18:20:50 -0500
commitc7ac2e965d025806ce5baddfc718814e3e58d639 (patch)
tree6e046c2445edf62b024a9389dc719865584dc9cf /examples/cmd_as_argument.py
parent60a212c1c585f0c4c06ffcfeb9882520af8dbf35 (diff)
parentc4893ea8a132c06bc71b0ddd63801604e6f85177 (diff)
downloadcmd2-git-c7ac2e965d025806ce5baddfc718814e3e58d639.tar.gz
Merge pull request #873 from python-cmd2/set_update
Updated set command to support tab completion of values
Diffstat (limited to 'examples/cmd_as_argument.py')
-rwxr-xr-xexamples/cmd_as_argument.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/cmd_as_argument.py b/examples/cmd_as_argument.py
index 08643a50..b65bcbcb 100755
--- a/examples/cmd_as_argument.py
+++ b/examples/cmd_as_argument.py
@@ -36,7 +36,7 @@ class CmdLineApp(cmd2.Cmd):
self.self_in_py = True
self.maxrepeats = 3
# Make maxrepeats settable at runtime
- self.settable['maxrepeats'] = 'max repetitions for speak command'
+ self.add_settable(cmd2.Settable('maxrepeats', int, 'max repetitions for speak command'))
speak_parser = argparse.ArgumentParser()
speak_parser.add_argument('-p', '--piglatin', action='store_true', help='atinLay')