Skip to content

Commit bb8f6dd

Browse files
authored
Merge pull request #549 from python-cmd2/instance_attributes
Convert aliases from a class attribute to an instance attribute
2 parents 3037335 + 08127ce commit bb8f6dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd2/cmd2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ class Cmd(cmd.Cmd):
307307
# Attributes used to configure the StatementParser, best not to change these at runtime
308308
multiline_commands = []
309309
shortcuts = {'?': 'help', '!': 'shell', '@': 'load', '@@': '_relative_load'}
310-
aliases = dict()
311310
terminators = [';']
312311

313312
# Attributes which are NOT dynamically settable at runtime
@@ -386,6 +385,9 @@ def __init__(self, completekey: str='tab', stdin=None, stdout=None, persistent_h
386385
# Commands to exclude from the history command
387386
self.exclude_from_history = '''history edit eof eos'''.split()
388387

388+
# Command aliases
389+
self.aliases = dict()
390+
389391
self._finalize_app_parameters()
390392

391393
self.initial_stdout = sys.stdout

0 commit comments

Comments
 (0)