summaryrefslogtreecommitdiff
path: root/Src/lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 4d8355bac..2e611707e 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1794,9 +1794,6 @@ exalias(void)
if (has_token(tokstr)) {
char *p, *t;
- if (isset(POSIXALIASES))
- return 0;
-
zshlextext = p = copy;
for (t = tokstr;
(*p++ = itok(*t) ? ztokens[*t++ - Pound] : *t++););
@@ -1816,7 +1813,7 @@ exalias(void)
if (tok == STRING) {
/* Check for an alias */
- if (checkalias()) {
+ if ((zshlextext != copy || !isset(POSIXALIASES)) && checkalias()) {
if (zshlextext == copy)
zshlextext = tokstr;
return 1;