diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-26 11:40:15 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-26 11:40:15 -0400 |
commit | dfbe317a7cc52b691723698b4464b260996ab425 (patch) | |
tree | 85df59946767d98d80a9bf4d0cab367ab4aae3c7 /examples/python_scripting.py | |
parent | 2cc1b90eba33fae1bf8d06a49bb9f64b662569ad (diff) | |
download | cmd2-git-dfbe317a7cc52b691723698b4464b260996ab425.tar.gz |
Refactored filtering in path_complete to use a function
Diffstat (limited to 'examples/python_scripting.py')
-rwxr-xr-x | examples/python_scripting.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/python_scripting.py b/examples/python_scripting.py index 0b0030a5..7847b8b6 100755 --- a/examples/python_scripting.py +++ b/examples/python_scripting.py @@ -88,7 +88,7 @@ class CmdLineApp(cmd2.Cmd): # Enable tab completion for cd command def complete_cd(self, text, line, begidx, endidx): - return self.path_complete(text, line, begidx, endidx, dir_only=True) + return self.path_complete(text, line, begidx, endidx, path_filter=os.path.isdir) dir_parser = argparse.ArgumentParser() dir_parser.add_argument('-l', '--long', action='store_true', help="display in long format with one item per line") |