diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-02-20 21:11:19 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-02-20 21:11:19 -0500 |
commit | 3cf43e1dd72d9831c8fcfdc1a3ff2b12c8d0aa6a (patch) | |
tree | ba1452ada437306665d6b7aad68a65953067a954 /cmd2 | |
parent | 174cd134866772f6b030fb44c3ea649a5aea66cb (diff) | |
download | cmd2-git-3cf43e1dd72d9831c8fcfdc1a3ff2b12c8d0aa6a.tar.gz |
Fixed bug where items tab completed in set were not current
Diffstat (limited to 'cmd2')
-rw-r--r-- | cmd2/cmd2.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index c690aef9..216ecf74 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1604,13 +1604,17 @@ class Cmd(cmd.Cmd): return commands def get_alias_names(self) -> List[str]: - """Return a list of alias names.""" + """Return list of current alias names""" return list(self.aliases) def get_macro_names(self) -> List[str]: - """Return a list of macro names.""" + """Return list of current macro names""" return list(self.macros) + def get_settable_names(self) -> List[str]: + """Return list of current settable names""" + return list(self.settable) + def get_commands_aliases_and_macros_for_completion(self) -> List[str]: """Return a list of visible commands, aliases, and macros for tab completion""" visible_commands = set(self.get_visible_commands()) @@ -2837,7 +2841,7 @@ class Cmd(cmd.Cmd): set_parser.add_argument('-a', '--all', action='store_true', help='display read-only settings as well') set_parser.add_argument('-l', '--long', action='store_true', help='describe function of parameter') setattr(set_parser.add_argument('param', nargs='?', help='parameter to set or view'), - ACTION_ARG_CHOICES, settable) + ACTION_ARG_CHOICES, get_settable_names) set_parser.add_argument('value', nargs='?', help='the new value for settable') @with_argparser(set_parser) |