summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/freefeatures.rst5
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)