diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-12 15:47:29 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-02-12 15:47:29 -0500 |
commit | 191f94abda1c4d565ea5b2dd1bd66e346db3b51b (patch) | |
tree | 8bf9b0bfa7a49dd4713e8b31616275cab5cd87c9 /examples/python_scripting.py | |
parent | ad0e2ae0d0d426fe08353fd82d1f9ff051be9108 (diff) | |
download | cmd2-git-191f94abda1c4d565ea5b2dd1bd66e346db3b51b.tar.gz |
Overhauling tab completion examples
Diffstat (limited to 'examples/python_scripting.py')
-rwxr-xr-x | examples/python_scripting.py | 1 |
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() |