summaryrefslogtreecommitdiffstats
path: root/bin/sh/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/input.c')
-rw-r--r--bin/sh/input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/sh/input.c b/bin/sh/input.c
index da225bc..05cc1eb 100644
--- a/bin/sh/input.c
+++ b/bin/sh/input.c
@@ -367,12 +367,16 @@ popstring(void)
struct strpush *sp = parsefile->strpush;
INTOFF;
+ if (sp->ap) {
+ if (parsenextc != sp->ap->val &&
+ (parsenextc[-1] == ' ' || parsenextc[-1] == '\t'))
+ forcealias();
+ sp->ap->flag &= ~ALIASINUSE;
+ }
parsenextc = sp->prevstring;
parsenleft = sp->prevnleft;
parselleft = sp->prevlleft;
/*out2fmt_flush("*** calling popstring: restoring to '%s'\n", parsenextc);*/
- if (sp->ap)
- sp->ap->flag &= ~ALIASINUSE;
parsefile->strpush = sp->prev;
if (sp != &(parsefile->basestrpush))
ckfree(sp);
OpenPOWER on IntegriCloud