diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/freefeatures.rst | 14 | ||||
-rw-r--r-- | docs/hooks.rst | 18 | ||||
-rw-r--r-- | docs/integrating.rst | 6 | ||||
-rw-r--r-- | docs/unfreefeatures.rst | 14 |
4 files changed, 24 insertions, 28 deletions
diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst index 156b003e..95ae127c 100644 --- a/docs/freefeatures.rst +++ b/docs/freefeatures.rst @@ -19,11 +19,11 @@ Both ASCII and UTF-8 encoded unicode text files are supported. Simply include one command per line, typed exactly as you would inside a ``cmd2`` application. -.. automethod:: cmd2.Cmd.do_load +.. automethod:: cmd2.cmd2.Cmd.do_load -.. automethod:: cmd2.Cmd.do__relative_load +.. automethod:: cmd2.cmd2.Cmd.do__relative_load -.. automethod:: cmd2.Cmd.do_edit +.. automethod:: cmd2.cmd2.Cmd.do_edit Comments @@ -297,11 +297,11 @@ the readline history. ``cmd2`` adds the option of making this readline history persistent via optional arguments to ``cmd2.Cmd.__init__()``: -.. automethod:: cmd2.Cmd.__init__ +.. automethod:: cmd2.cmd2.Cmd.__init__ ``cmd2`` makes a third type of history access available with the **history** command: -.. automethod:: cmd2.Cmd.do_history +.. automethod:: cmd2.cmd2.Cmd.do_history .. _`Readline Emacs editing mode`: http://readline.kablamo.org/emacs.html @@ -318,9 +318,9 @@ Misc. pre-defined commands Several generically useful commands are defined with automatically included ``do_`` methods. -.. automethod:: cmd2.Cmd.do_quit +.. automethod:: cmd2.cmd2.Cmd.do_quit -.. automethod:: cmd2.Cmd.do_shell +.. automethod:: cmd2.cmd2.Cmd.do_shell ( ``!`` is a shortcut for ``shell``; thus ``!ls`` is equivalent to ``shell ls``.) diff --git a/docs/hooks.rst b/docs/hooks.rst index 02f44274..c28f9b8f 100644 --- a/docs/hooks.rst +++ b/docs/hooks.rst @@ -18,9 +18,9 @@ Application Lifecycle Hook Methods ---------------------------------- The ``preloop`` and ``postloop`` methods run before and after the main loop, respectively. -.. automethod:: cmd2.Cmd.preloop +.. automethod:: cmd2.cmd2.Cmd.preloop -.. automethod:: cmd2.Cmd.postloop +.. automethod:: cmd2.cmd2.Cmd.postloop Application Lifecycle Attributes -------------------------------- @@ -41,21 +41,21 @@ Command Processing Hooks Inside the main loop, every time the user hits <Enter> the line is processed by the ``onecmd_plus_hooks`` method. -.. automethod:: cmd2.Cmd.onecmd_plus_hooks +.. automethod:: cmd2.cmd2.Cmd.onecmd_plus_hooks As the ``onecmd_plus_hooks`` name implies, there are a number of *hook* methods that can be defined in order to inject application-specific behavior at various points during the processing of a line of text entered by the user. ``cmd2`` increases the 2 hooks provided by ``cmd`` (**precmd** and **postcmd**) to 6 for greater flexibility. Here are the various hook methods, presented in chronological order starting with the ones called earliest in the process. -.. automethod:: cmd2.Cmd.preparse +.. automethod:: cmd2.cmd2.Cmd.preparse -.. automethod:: cmd2.Cmd.postparse +.. automethod:: cmd2.cmd2.Cmd.postparse -.. automethod:: cmd2.Cmd.postparsing_precmd +.. automethod:: cmd2.cmd2.Cmd.postparsing_precmd -.. automethod:: cmd2.Cmd.precmd +.. automethod:: cmd2.cmd2.Cmd.precmd -.. automethod:: cmd2.Cmd.postcmd +.. automethod:: cmd2.cmd2.Cmd.postcmd -.. automethod:: cmd2.Cmd.postparsing_postcmd +.. automethod:: cmd2.cmd2.Cmd.postparsing_postcmd diff --git a/docs/integrating.rst b/docs/integrating.rst index bcb9301c..56691069 100644 --- a/docs/integrating.rst +++ b/docs/integrating.rst @@ -76,8 +76,4 @@ several disadvantages, including: Here is a little more info on ``runcmds_plus_hooks``: -.. automethod:: cmd2.Cmd.runcmds_plus_hooks - - - - +.. automethod:: cmd2.cmd2.Cmd.runcmds_plus_hooks diff --git a/docs/unfreefeatures.rst b/docs/unfreefeatures.rst index e69f8a7e..a4776a53 100644 --- a/docs/unfreefeatures.rst +++ b/docs/unfreefeatures.rst @@ -114,6 +114,7 @@ that module. ``cmd2`` defines a few decorators which change the behavior of how arguments get parsed for and passed to a ``do_`` method. See the section :ref:`decorators` for more information. +.. _argparse: https://docs.python.org/3/library/argparse.html poutput, pfeedback, perror, ppaged ================================== @@ -128,10 +129,10 @@ instead. These methods have these advantages: - ``.pfeedback()`` destination is controlled by :ref:`quiet` parameter. - Option to display long output using a pager via ``ppaged()`` -.. automethod:: cmd2.Cmd.poutput -.. automethod:: cmd2.Cmd.perror -.. automethod:: cmd2.Cmd.pfeedback -.. automethod:: cmd2.Cmd.ppaged +.. automethod:: cmd2.cmd2.Cmd.poutput +.. automethod:: cmd2.cmd2.Cmd.perror +.. automethod:: cmd2.cmd2.Cmd.pfeedback +.. automethod:: cmd2.cmd2.Cmd.ppaged color @@ -139,7 +140,7 @@ color Text output can be colored by wrapping it in the ``colorize`` method. -.. automethod:: cmd2.Cmd.colorize +.. automethod:: cmd2.cmd2.Cmd.colorize .. _quiet: @@ -160,7 +161,7 @@ Presents numbered options to user, as bash ``select``. ``app.select`` is called from within a method (not by the user directly; it is ``app.select``, not ``app.do_select``). -.. automethod:: cmd2.Cmd.select +.. automethod:: cmd2.cmd2.Cmd.select :: @@ -177,4 +178,3 @@ Presents numbered options to user, as bash ``select``. 2. salty Sauce? 2 wheaties with salty sauce, yum! - |