about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-22 12:13:15 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-03-22 12:13:15 +0000
commitdb0e5c2d8bd8c7dea33b70a3b71df59f29c25b6a (patch)
treea5f98850b3253d08ef9a2d1b89af9dbecdbd6bc1 /Src/exec.c
parent1ddc7c72e532bbbebf5027b78ce885d496a3fe1f (diff)
downloadzsh-db0e5c2d8bd8c7dea33b70a3b71df59f29c25b6a.tar.gz
zsh-db0e5c2d8bd8c7dea33b70a3b71df59f29c25b6a.tar.xz
zsh-db0e5c2d8bd8c7dea33b70a3b71df59f29c25b6a.zip
skip redirections in execpline2() when looking for the command code (13706)
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index ce083da86..fa49c3137 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1189,11 +1189,11 @@ execpline2(Estate state, wordcode pcode,
 	execcmd(state, input, output, how, last1 ? 1 : 2);
     else {
 	int old_list_pipe = list_pipe;
-	Wordcode next = state->pc + (*state->pc);
+	Wordcode next = state->pc + (*state->pc), pc;
 	wordcode code;
 
 	state->pc++;
-	code = *state->pc;
+	for (pc = state->pc; wc_code(code = *pc) == WC_REDIR; pc += 3);
 
 	mpipe(pipes);