summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-25 10:56:19 -0500
committerGitHub <noreply@github.com>2020-02-25 10:56:19 -0500
commit21dab8b1664dcd88a1872f394890460977e01632 (patch)
treeaf144311b0b3e143a88c3b36734fead39338432b /cmd2/cmd2.py
parentf636aa1375fdeafe123b5e6483d5c96da7d3f2ba (diff)
parentf18390b31e52eb2bfebab34841da19cac25fab4c (diff)
downloadcmd2-git-21dab8b1664dcd88a1872f394890460977e01632.tar.gz
Merge pull request #901 from python-cmd2/api_docs_cleanup
Address comments from PR #899
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index b2d745ac..7bee1b6a 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -406,7 +406,7 @@ class Cmd(cmd.Cmd):
raise KeyError(name + " is not a settable parameter")
def _build_settables(self):
- """Construct the default settings"""
+ """Add default settables"""
self.add_settable(Settable('allow_style', str,
'Allow ANSI text style sequences in output (valid values: '
'{}, {}, {})'.format(ansi.STYLE_TERMINAL,
@@ -2014,7 +2014,14 @@ class Cmd(cmd.Cmd):
def cmd_func(self, command: str) -> Optional[Callable]:
"""
Get the function for a command
+
:param command: the name of the command
+
+ :Example:
+
+ >>> helpfunc = self.cmd_func('help')
+
+ helpfunc now contains a reference to the ``do_help`` method
"""
func_name = self._cmd_func_name(command)
if func_name: