summaryrefslogtreecommitdiffhomepage
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 527abc7b1..dc0f60747 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12276,11 +12276,17 @@ static const char *
expandstr(const char *ps)
{
union node n;
+ int saveprompt;
/* XXX Fix (char *) cast. It _is_ a bug. ps is variable's value,
* and token processing _can_ alter it (delete NULs etc). */
setinputstring((char *)ps);
+
+ saveprompt = doprompt;
+ doprompt = 0;
readtoken1(pgetc(), PSSYNTAX, nullstr, 0);
+ doprompt = saveprompt;
+
popfile();
n.narg.type = NARG;