summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2020-02-24 22:44:38 -0700
committerkotfu <kotfu@kotfu.net>2020-02-24 22:44:38 -0700
commitb74b272c478ca8c504d2fa6e1613b28e09eb114f (patch)
tree5a628d04994c0c67a7a10c11c6ab133a881c4869 /cmd2/cmd2.py
parent33049bf86f031dd48f052848701f4efc8634b34d (diff)
downloadcmd2-git-b74b272c478ca8c504d2fa6e1613b28e09eb114f.tar.gz
Clarify docstring for cmd_func
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 4b1f8e50..7bee1b6a 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -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: