summaryrefslogtreecommitdiff
path: root/examples/python_scripting.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2020-02-13 22:34:22 -0500
committerGitHub <noreply@github.com>2020-02-13 22:34:22 -0500
commit013b9e0a2c75e17f8aa0e0f7cbe50d84d2f657d8 (patch)
treee3cc4c27ed21a2e1d01caae0bda4ea51c44e59f6 /examples/python_scripting.py
parentad0e2ae0d0d426fe08353fd82d1f9ff051be9108 (diff)
parent7fe5cf7c1ab7d7a68991d1aeebaa338f7c5d2fd0 (diff)
downloadcmd2-git-013b9e0a2c75e17f8aa0e0f7cbe50d84d2f657d8.tar.gz
Merge pull request #887 from python-cmd2/completion_docs
Completion docs
Diffstat (limited to 'examples/python_scripting.py')
-rwxr-xr-xexamples/python_scripting.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py
index fc23c562..198e784d 100755
--- a/examples/python_scripting.py
+++ b/examples/python_scripting.py
@@ -87,6 +87,7 @@ class CmdLineApp(cmd2.Cmd):
# Enable tab completion for cd command
def complete_cd(self, text, line, begidx, endidx):
+ # Tab complete only directories
return self.path_complete(text, line, begidx, endidx, path_filter=os.path.isdir)
dir_parser = argparse.ArgumentParser()