diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-06-25 13:28:48 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-06-25 13:28:48 -0400 |
| commit | 81d5ad7cac5dbb55e0c615c1aede6c210142458d (patch) | |
| tree | 7a4507847a3b9b74034b29e8031ea1491fa71098 /docs/features | |
| parent | a84860ef10464d3066ed99a8da80a37a184bde64 (diff) | |
| download | cmd2-git-81d5ad7cac5dbb55e0c615c1aede6c210142458d.tar.gz | |
Updated docs
Diffstat (limited to 'docs/features')
| -rw-r--r-- | docs/features/initialization.rst | 1 | ||||
| -rw-r--r-- | docs/features/plugins.rst | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/docs/features/initialization.rst b/docs/features/initialization.rst index e3acf859..e51f87b2 100644 --- a/docs/features/initialization.rst +++ b/docs/features/initialization.rst @@ -50,6 +50,7 @@ capabilities which you may wish to utilize while initializing the app:: self.add_settable(cmd2.Settable('foreground_color', str, 'Foreground color to use with echo command', + self, choices=fg.colors())) @cmd2.with_category(CUSTOM_CATEGORY) diff --git a/docs/features/plugins.rst b/docs/features/plugins.rst index ecd3a32d..13a3910b 100644 --- a/docs/features/plugins.rst +++ b/docs/features/plugins.rst @@ -81,7 +81,7 @@ example:: super().__init__(*args, **kwargs) # code placed here runs after cmd2.Cmd initializes self.mysetting = 'somevalue' - self.add_settable(cmd2.Settable('mysetting', str, 'short help message for mysetting')) + self.add_settable(cmd2.Settable('mysetting', str, 'short help message for mysetting', self)) You can hide settings from the user by calling :meth:`~cmd2.Cmd.remove_settable`. See :ref:`features/settings:Settings` for |
