about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-08-26 21:50:13 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-08-26 21:50:13 -0700
commit8186e9c94b6536b7e9ed8b40c467922c8d639f6d (patch)
treeca763b4ce4f69026c61d6dab99020ab0b926c303
parentcaaed169e54d9e409ee77353b1fff1f0ba818aea (diff)
downloadzsh-8186e9c94b6536b7e9ed8b40c467922c8d639f6d.tar.gz
zsh-8186e9c94b6536b7e9ed8b40c467922c8d639f6d.tar.xz
zsh-8186e9c94b6536b7e9ed8b40c467922c8d639f6d.zip
36285: update 36025, context cannot be command and redirect at the same time, redirect wins
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_tricky.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a0311ba9b..4b357044e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-08-26  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 36285: Src/Zle/zle_tricky.c: update 36025, context cannot be
+	command and redirect at the same time, redirect wins
+
 	* 36282: Test/A05execution.ztst: discard stderr of "hang" test
 
 2015-08-25  Peter Stephenson  <p.w.stephenson@ntlworld.com>
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index b87b99b00..cb17bdeca 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1184,11 +1184,12 @@ get_comp_string(void)
 	 * considering a new command.  Consequently, although this looks
 	 * relatively harmless by itself, it's probably incomplete.
 	 */
-	lincmd = (incmdpos && !ins && !incond) ||
-	    (oins == 2 && wordpos == 2) ||
-	    (ins == 3 && wordpos == 1) ||
-	    (cmdtok == NULLTOK && !incond);
 	linredir = (inredir && !ins);
+	lincmd = !linredir &&
+	    ((incmdpos && !ins && !incond) ||
+	     (oins == 2 && wordpos == 2) ||
+	     (ins == 3 && wordpos == 1) ||
+	     (cmdtok == NULLTOK && !incond));
 	oins = ins;
 	/* Get the next token. */
 	if (linarr)