summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-17 12:12:55 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-17 12:12:55 -0500
commitb6971fb9d518da673de1943e9e47dffe1acaf4b4 (patch)
treec311eb89aa27326f4948d5eac7577d8892ed4852 /cmd2/cmd2.py
parent729e152c525bc30d36f130f8dc8442aeb00d1de8 (diff)
downloadcmd2-git-b6971fb9d518da673de1943e9e47dffe1acaf4b4.tar.gz
Only tab complete after redirection tokens if redirection is allowed
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 3b1fbb6f..5a728e56 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1050,8 +1050,8 @@ class Cmd(cmd.Cmd):
in_pipe = False
in_file_redir = True
- # Not a redirection token
- else:
+ # Only tab complete after redirection tokens if redirection is allowed
+ elif self.allow_redirection:
do_shell_completion = False
do_path_completion = False