diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2020-02-24 17:30:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-24 17:30:34 -0500 |
commit | d25fd7146131688e934290a3c5bf0407e904dbb2 (patch) | |
tree | 5fd4b905157eafbf3ea0071bfd625763b109ee78 /docs/api/cmd.rst | |
parent | fea1bc15f4a53aa72d16c2985377fe3987b6b348 (diff) | |
parent | 803f71a04d7f7290ca1390a164808679f5943178 (diff) | |
download | cmd2-git-d25fd7146131688e934290a3c5bf0407e904dbb2.tar.gz |
Merge pull request #899 from python-cmd2/api_docs
API documentation
Diffstat (limited to 'docs/api/cmd.rst')
-rw-r--r-- | docs/api/cmd.rst | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/docs/api/cmd.rst b/docs/api/cmd.rst index 213a14ec..3fcd3352 100644 --- a/docs/api/cmd.rst +++ b/docs/api/cmd.rst @@ -24,13 +24,42 @@ cmd2.Cmd .. attribute:: prompt - The prompt issued to solicit input. - Default: ``(Cmd)``. + The prompt issued to solicit input. The default value is ``(Cmd)``. + See :ref:`features/prompt:Prompt` for more information. + + .. attribute:: continuation_prompt + + The prompt issued to solicit input for the 2nd and subsequent lines + of a :ref:`multiline command <features/multiline_commands:Multiline Commands>` + + .. attribute:: echo + + If ``True``, output the prompt and user input before executing the command. + When redirecting a series of commands to an output file, this allows you to + see the command in the output. .. attribute:: settable - This dictionary contains the name and description of all settings available to users. + This dictionary contains the name and description of all settings + available to users. Users use the :ref:`features/builtin_commands:set` command to view and modify settings. Settings are stored in instance attributes with the same name as the setting. + + .. attribute:: history + + A record of previously entered commands. + + This attribute is an instance of :class:`cmd2.history.History`, and + each command is an instance of :class:`cmd2.history.HistoryItem`. + + .. attribute:: statement_parser + + An instance of :class:`cmd2.parsing.StatementParser` initialized and + configured appropriately for parsing user input. + + .. attribute:: intro + + Set an introduction message which is displayed to the user before + the :ref:`features/hooks:Command Processing Loop` begins. |