summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-23 17:34:04 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-23 17:34:04 -0400
commit6deb39d75f785e40daaa14ef033bf5797f42944f (patch)
treeba1d1995f2f8b312e431e63062562fc339009339 /README.md
parent5fd8e00010e068eb0632b6cb20860a18774181a5 (diff)
downloadcmd2-git-6deb39d75f785e40daaa14ef033bf5797f42944f.tar.gz
Updated tab completion documentation
Diffstat (limited to 'README.md')
-rwxr-xr-xREADME.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index ce2fdb7c..32b8e7fa 100755
--- a/README.md
+++ b/README.md
@@ -171,16 +171,18 @@ Instructions for implementing each feature follow.
- And also provide help hints for values associated with these flags
- Experiment with the [argprint.py](https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py) example
using the **oprint** and **pprint** commands to get a feel for how this works
+ - `basic_complete` helper method for tab completion against a list
- `path_complete` helper method provides flexible tab completion of file system paths
- See the [paged_output.py](https://github.com/python-cmd2/cmd2/blob/master/examples/paged_output.py) example for a simple use case
- See the [python_scripting.py](https://github.com/python-cmd2/cmd2/blob/master/examples/python_scripting.py) example for a more full-featured use case
- - `flag_based_complete` helper method for tab completion based on a particular flag preceding the token being completed
- - See the [basic_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/basic_completion.py) example for a demonstration of how to use this feature
- - `index_based_complete` helper method for tab completion based on a fixed position in the input string
- - See the [basic_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/basic_completion.py) example for a demonstration of how to use this feature
- - `basic_complete` helper method for tab completion against a list
- `delimiter_complete` helper method for tab completion against a list but each match is split on a delimiter
- See the [basic_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/basic_completion.py) example for a demonstration of how to use this feature
+ - `flag_based_complete` helper method for tab completion based on a particular flag preceding the token being completed
+ - `index_based_complete` helper method for tab completion based on a fixed position in the input string
+ - See the [basic_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/basic_completion.py) example for a demonstration of how to use these features
+ - `flag_based_complete()` and `index_based_complete()` are basic methods and should only be used if you are not
+ familiar with argparse. The recommended approach for tab completing positional tokens and flags is to use
+ argparse-based completion
- `cmd2` in combination with `argparse` also provide several advanced capabilities for automatic tab completion
- See the [argparse_completion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/argparse_completion.py) example for more info