diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-09 01:26:08 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-09 02:34:58 -0400 |
| commit | 1a2095e5c373430e5aa4bda2ee24f65f4527a002 (patch) | |
| tree | 62575c664a651027cea415cea574454d1e4637ca /docs/features | |
| parent | 0ca6038e9ed2928c84ce5a313916d4d426802b4f (diff) | |
| download | cmd2-git-1a2095e5c373430e5aa4bda2ee24f65f4527a002.tar.gz | |
Added section to completion docs about read_input() function
Diffstat (limited to 'docs/features')
| -rw-r--r-- | docs/features/completion.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/features/completion.rst b/docs/features/completion.rst index 0e6bedd9..3894a4eb 100644 --- a/docs/features/completion.rst +++ b/docs/features/completion.rst @@ -89,6 +89,7 @@ completion hints. .. _argparse-based: + Tab Completion Using argparse Decorators ---------------------------------------- @@ -132,6 +133,17 @@ any of the 3 completion parameters: ``choices``, ``choices_provider``, and See the argparse_completion_ example or the implementation of the built-in :meth:`~cmd2.Cmd.do_set` command for demonstration of how this is used. + +Custom Completion with ``read_input()`` +-------------------------------------------------- + +``cmd2`` provides :attr:`cmd2.Cmd.read_input` as an alternative to Python's +``input()`` function. ``read_input`` supports configurable tab completion and +up-arrow history at the prompt. See read_input_ example for a demonstration. + +.. _read_input: https://github.com/python-cmd2/cmd2/blob/master/examples/read_input.py + + For More Information -------------------- |
