diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-14 21:26:21 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-14 21:26:21 -0400 |
commit | 8cf0b30af678717160a6c53cc7c0c84aa007c42f (patch) | |
tree | 3f15fdd56bc2c740118c8b148d60c745af5b529f /README.md | |
parent | cfcff77bf47910e4c5aaaad8fa33f181281f94ee (diff) | |
download | cmd2-git-8cf0b30af678717160a6c53cc7c0c84aa007c42f.tar.gz |
Updated docs to reflect that shortcuts are now passed into the super class initializer
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -240,12 +240,11 @@ class CmdLineApp(cmd2.Cmd): def __init__(self): self.maxrepeats = 3 - - # Add stuff to shortcuts before calling base class initializer - self.shortcuts.update({'&': 'speak'}) + shortcuts = dict(self.DEFAULT_SHORTCUTS) + shortcuts.update({'&': 'speak'}) # Set use_ipython to True to enable the "ipy" command which embeds and interactive IPython shell - super().__init__(use_ipython=False, multiline_commands=['orate']) + super().__init__(use_ipython=False, multiline_commands=['orate'], shortcuts=shortcuts) # Make maxrepeats settable at runtime self.settable['maxrepeats'] = 'max repetitions for speak command' |