From 8186e9c94b6536b7e9ed8b40c467922c8d639f6d Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Wed, 26 Aug 2015 21:50:13 -0700 Subject: 36285: update 36025, context cannot be command and redirect at the same time, redirect wins --- Src/Zle/zle_tricky.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Src') 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) -- cgit 1.4.1