mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-16 22:10:54 +01:00
34804: refine POSIX_ALIAS change to preserve old behavior of [[ ]] conditionals
This commit is contained in:
parent
ab4065623a
commit
7d2b53f65b
3 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-03-28 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 34804: Src/lex.c: refine 34734 POSIX_ALIAS change to preserve
|
||||||
|
old behavior of [[ ]] conditionals
|
||||||
|
|
||||||
2015-03-27 Barton E. Schaefer <schaefer@zsh.org>
|
2015-03-27 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 34788: Src/lex.c: refine errflag handling in cmd_or_math()
|
* 34788: Src/lex.c: refine errflag handling in cmd_or_math()
|
||||||
|
|
|
@ -1794,9 +1794,6 @@ exalias(void)
|
||||||
if (has_token(tokstr)) {
|
if (has_token(tokstr)) {
|
||||||
char *p, *t;
|
char *p, *t;
|
||||||
|
|
||||||
if (isset(POSIXALIASES))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
zshlextext = p = copy;
|
zshlextext = p = copy;
|
||||||
for (t = tokstr;
|
for (t = tokstr;
|
||||||
(*p++ = itok(*t) ? ztokens[*t++ - Pound] : *t++););
|
(*p++ = itok(*t) ? ztokens[*t++ - Pound] : *t++););
|
||||||
|
@ -1816,7 +1813,7 @@ exalias(void)
|
||||||
|
|
||||||
if (tok == STRING) {
|
if (tok == STRING) {
|
||||||
/* Check for an alias */
|
/* Check for an alias */
|
||||||
if (checkalias()) {
|
if ((zshlextext != copy || !isset(POSIXALIASES)) && checkalias()) {
|
||||||
if (zshlextext == copy)
|
if (zshlextext == copy)
|
||||||
zshlextext = tokstr;
|
zshlextext = tokstr;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -247,3 +247,7 @@
|
||||||
>extendedglob is initially off
|
>extendedglob is initially off
|
||||||
>bareglobqual is still on
|
>bareglobqual is still on
|
||||||
>extendedglob is on, too
|
>extendedglob is on, too
|
||||||
|
|
||||||
|
emulate sh -c '[[ a == a ]]'
|
||||||
|
0:regression test for POSIX_ALIASES reserved words
|
||||||
|
F:Some reserved tokens are handled in alias expansion
|
||||||
|
|
Loading…
Reference in a new issue