summaryrefslogtreecommitdiffhomepage
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f1c21188e..5a001b004 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13265,10 +13265,14 @@ readtoken(void)
if (kwd & CHKNL) {
while (t == TNL) {
parseheredoc();
+ checkkwd = 0;
t = xxreadtoken();
}
}
+ kwd |= checkkwd;
+ checkkwd = 0;
+
if (t != TWORD || quoteflag) {
goto out;
}
@@ -13287,7 +13291,7 @@ readtoken(void)
}
}
- if (checkkwd & CHKALIAS) {
+ if (kwd & CHKALIAS) {
#if ENABLE_ASH_ALIAS
struct alias *ap;
ap = lookupalias(wordtext, 1);
@@ -13300,7 +13304,6 @@ readtoken(void)
#endif
}
out:
- checkkwd = 0;
#if DEBUG
if (!alreadyseen)
TRACE(("token '%s' %s\n", tokname_array[t], t == TWORD ? wordtext : ""));