diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-11 22:04:24 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-11 22:04:24 +0000 |
commit | bfd6782b5a7a75568be3554bbdc7d7eee53e6538 (patch) | |
tree | 75fb9fce21e3897156eed95bb68428a659c711ad /Src/loop.c | |
parent | a978d1c47cc8fab586b26b74a3abadbee0da3439 (diff) | |
download | zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.gz zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.xz zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.zip |
zsh-workers/9295
Diffstat (limited to 'Src/loop.c')
-rw-r--r-- | Src/loop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/loop.c b/Src/loop.c index 0d7379c00..b8e7f956f 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -154,7 +154,7 @@ execselect(Cmd cmd, LinkList args, int flags) Forcmd node; char *str, *s; LinkNode n; - int i; + int i, usezle; FILE *inp; size_t more; @@ -172,12 +172,13 @@ execselect(Cmd cmd, LinkList args, int flags) lastval = 0; pushheap(); cmdpush(CS_SELECT); - inp = fdopen(dup((SHTTY == -1) ? 0 : SHTTY), "r"); + usezle = interact && SHTTY != -1 && isset(USEZLE); + inp = fdopen(dup(usezle ? SHTTY : 0), "r"); more = selectlist(args, 0); for (;;) { for (;;) { if (empty(bufstack)) { - if (interact && SHTTY != -1 && isset(USEZLE)) { + if (usezle) { int oef = errflag; isfirstln = 1; |