summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-26 20:35:06 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2018-09-26 20:35:06 -0400
commit08127ceabdcd5012e6b39214de27244a5c80f65b (patch)
tree6ed2c5f296d24e918d98f8d7340b79aa5de9b04f /cmd2
parent303733526d7335133f7f2dc55f54dca410a9f1de (diff)
downloadcmd2-git-08127ceabdcd5012e6b39214de27244a5c80f65b.tar.gz
Convert aliases from a class attribute to an instance attribute
Diffstat (limited to 'cmd2')
-rw-r--r--cmd2/cmd2.py4
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