diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-26 20:41:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 20:41:55 -0400 |
commit | bb8f6dd930820ef580d3399726256ac0a19a78dc (patch) | |
tree | 6ed2c5f296d24e918d98f8d7340b79aa5de9b04f /cmd2/cmd2.py | |
parent | 303733526d7335133f7f2dc55f54dca410a9f1de (diff) | |
parent | 08127ceabdcd5012e6b39214de27244a5c80f65b (diff) | |
download | cmd2-git-bb8f6dd930820ef580d3399726256ac0a19a78dc.tar.gz |
Merge pull request #549 from python-cmd2/instance_attributes
Convert aliases from a class attribute to an instance attribute
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 7d8ac7dc..64702577 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -307,7 +307,6 @@ class Cmd(cmd.Cmd): # Attributes used to configure the StatementParser, best not to change these at runtime multiline_commands = [] shortcuts = {'?': 'help', '!': 'shell', '@': 'load', '@@': '_relative_load'} - aliases = dict() terminators = [';'] # Attributes which are NOT dynamically settable at runtime @@ -386,6 +385,9 @@ class Cmd(cmd.Cmd): # Commands to exclude from the history command self.exclude_from_history = '''history edit eof eos'''.split() + # Command aliases + self.aliases = dict() + self._finalize_app_parameters() self.initial_stdout = sys.stdout |