diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/lex.c | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2015-09-28 Barton E. Schaefer <schaefer@zsh.org> + + * 36669: Src/lex.c: fix ${(z)...} of an an incomplete math + expression by restoring "((" at the front of the token + 2015-09-28 Daniel Shahaf <d.s@daniel.shahaf.name> * unposted: Etc/zsh-development-guide: Update link to my @@ -783,6 +783,15 @@ gettok(void) */ tokstr = NULL; return INPAR; + + case CMD_OR_MATH_ERR: + /* + * LEXFLAGS_ACTIVE means we came from bufferwords(), + * so we treat as an incomplete math expression + */ + if (lexflags & LEXFLAGS_ACTIVE) + tokstr = dyncat("((", tokstr ? tokstr : ""); + /* fall through */ default: return LEXERR; |