summaryrefslogtreecommitdiff
path: root/docs/settingchanges.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/settingchanges.rst')
-rw-r--r--docs/settingchanges.rst8
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/settingchanges.rst b/docs/settingchanges.rst
index c9345bc6..b9ad4a22 100644
--- a/docs/settingchanges.rst
+++ b/docs/settingchanges.rst
@@ -33,11 +33,9 @@ To define more shortcuts, update the dict ``App.shortcuts`` with the
class App(Cmd2):
def __init__(self):
- # Make sure you update the shortcuts attribute before calling the super class __init__
- self.shortcuts.update({'*': 'sneeze', '~': 'squirm'})
-
- # Make sure to call this super class __init__ after updating shortcuts
- cmd2.Cmd.__init__(self)
+ shortcuts = dict(self.DEFAULT_SHORTCUTS)
+ shortcuts.update({'*': 'sneeze', '~': 'squirm'})
+ cmd2.Cmd.__init__(self, shortcuts=shortcuts)
.. warning::