summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-02-17 12:30:01 -0500
committerGitHub <noreply@github.com>2020-02-17 12:30:01 -0500
commit2221e08e996a34660125536e3fc34eb231b3b060 (patch)
treec311eb89aa27326f4948d5eac7577d8892ed4852 /cmd2/cmd2.py
parent729e152c525bc30d36f130f8dc8442aeb00d1de8 (diff)
parentb6971fb9d518da673de1943e9e47dffe1acaf4b4 (diff)
downloadcmd2-git-2221e08e996a34660125536e3fc34eb231b3b060.tar.gz
Merge pull request #890 from python-cmd2/complete_redirection
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