summaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'input.c')
-rw-r--r--input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input.c b/input.c
index 6294159..1185870 100644
--- a/input.c
+++ b/input.c
@@ -120,7 +120,7 @@ static int fdgchar() {
if (chars_out >= chars_in + 2) { /* has the buffer been exhausted? if so, replenish it */
while (1) {
#if READLINE
- if (interactive && istack->fd == 0) {
+ if (interactive && istack->fd == 0 && isatty(0)) {
rlinebuf = rc_readline(prompt);
if (rlinebuf == NULL) {
chars_in = 0;