summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-02-12 13:03:32 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:03 +0100
commit8d8059fc729b5152b4b168944ce9399cc63cbf38 (patch)
tree430b6b7c4eced3495f90bb1f6617fc1fabe78526
parent02d9475165e3b52bce47b0699fb8a9f67da4f0f4 (diff)
check that it's a file descriptor we've got before seeing if it' stdin
-rw-r--r--input.c5
1 files changed, 2 insertions, 3 deletions
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);
}
}
-