From 191f94abda1c4d565ea5b2dd1bd66e346db3b51b Mon Sep 17 00:00:00 2001 From: Kevin Van Brunt Date: Wed, 12 Feb 2020 15:47:29 -0500 Subject: Overhauling tab completion examples --- examples/python_scripting.py | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/python_scripting.py') 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() -- cgit v1.2.1