diff options
author | kotfu <kotfu@kotfu.net> | 2020-02-20 21:37:08 -0700 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2020-02-20 21:37:08 -0700 |
commit | 36465ad953ac550626d219bb08c7ef214eaaede0 (patch) | |
tree | 438a101d68a6acae872cf72b939ea6015152fad0 /docs/api | |
parent | 387d13e75ae7b336b254481012b62361f72824f0 (diff) | |
download | cmd2-git-36465ad953ac550626d219bb08c7ef214eaaede0.tar.gz |
Add history api documentation
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/cmd.rst | 10 | ||||
-rw-r--r-- | docs/api/history.rst | 16 | ||||
-rw-r--r-- | docs/api/index.rst | 1 |
3 files changed, 26 insertions, 1 deletions
diff --git a/docs/api/cmd.rst b/docs/api/cmd.rst index 213a14ec..345e6219 100644 --- a/docs/api/cmd.rst +++ b/docs/api/cmd.rst @@ -29,8 +29,16 @@ cmd2.Cmd .. 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`. diff --git a/docs/api/history.rst b/docs/api/history.rst new file mode 100644 index 00000000..a685db7a --- /dev/null +++ b/docs/api/history.rst @@ -0,0 +1,16 @@ +cmd2.history +=============== + +.. autoclass:: cmd2.history.History + :members: + +.. autoclass:: cmd2.history.HistoryItem + :members: + + .. attribute:: statement + + The statement object resulting from parsing + + .. attribute:: idx + + The 1-based index of this statement in the history list diff --git a/docs/api/index.rst b/docs/api/index.rst index fea39f72..43b36c7a 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -7,6 +7,7 @@ API Reference cmd parsing decorators + history ansi utils constants |