From 8d8059fc729b5152b4b168944ce9399cc63cbf38 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Thu, 12 Feb 1998 13:03:32 +0000 Subject: check that it's a file descriptor we've got before seeing if it' stdin --- input.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index d8f19c1..bff0e16 100644 --- a/input.c +++ b/input.c @@ -280,7 +280,7 @@ extern Node *doit(bool execit) { } if ((s = varlookup("prompt")) != NULL) { #if READLINE - if (istack->fd == 0) + if (istack->t == iFd && istack->fd == 0) prompt = s->w; else #endif @@ -367,11 +367,10 @@ extern void print_prompt2() { lineno++; if (interactive) { #if READLINE - if (istack->fd == 0) + if (istack->t == iFd && istack->fd == 0) prompt = prompt2; else #endif fprint(2, "%s", prompt2); } } - -- cgit v1.2.3