diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-25 02:23:59 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-25 02:23:59 -0400 |
| commit | 4701a399282543e9bd7ee8df91b840c35a14ff99 (patch) | |
| tree | f63ad9021f4f483260fa440eafd00e88f1d4431c /docs | |
| parent | 40ca5eb984577d199baaf2e905cc1f431533114a (diff) | |
| download | cmd2-git-4701a399282543e9bd7ee8df91b840c35a14ff99.tar.gz | |
Updated documentation
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/freefeatures.rst | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/freefeatures.rst b/docs/freefeatures.rst index 740ea067..d700d144 100644 --- a/docs/freefeatures.rst +++ b/docs/freefeatures.rst @@ -333,8 +333,7 @@ Additionally, it is trivial to add identical file system path completion to your have defined a custom command ``foo`` by implementing the ``do_foo`` method. To enable path completion for the ``foo`` command, then add a line of code similar to the following to your class which inherits from ``cmd2.Cmd``:: - # Make sure you have an "import functools" somewhere at the top - complete_foo = functools.partial(path_complete) + complete_foo = self.path_complete This will effectively define the ``complete_foo`` readline completer method in your class and make it utilize the same path completion logic as the built-in commands. @@ -345,4 +344,4 @@ path completion of directories only for this command by adding a line of code si which inherits from ``cmd2.Cmd``:: # Make sure you have an "import functools" somewhere at the top - complete_bar = functools.partial(path_complete, dir_only=True) + complete_bar = functools.partialmethod(cmd2.Cmd.path_complete, dir_only=True) |
