diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2017-10-13 13:50:18 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2017-10-13 13:50:18 -0700 |
commit | 1fb6939b94750746de349b6b61115d27fda500f3 (patch) | |
tree | b920ee7e2157d3409010c4ce1cd484e5ef9591a5 | |
parent | 7c36add497883137a9691b994d34e0385b0eab8f (diff) | |
download | zsh-1fb6939b94750746de349b6b61115d27fda500f3.tar.gz zsh-1fb6939b94750746de349b6b61115d27fda500f3.tar.xz zsh-1fb6939b94750746de349b6b61115d27fda500f3.zip |
41873: temporarily disable effects of ${(Z:n:)...} for parsing $(...) within the parameter value
Also fix minor typo in commit b3fa5c52 ChangeLog.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/lex.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 7d1544c36..497092813 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ +2017-10-13 Barton E. Schaefer <schaefer@zsh.org> + + * 41873: Src/lex.c: temporarily disable effects of ${(Z:n:)...} + for parsing $(...) expressions within the parameter value + 2017-10-13 Daniel Shahaf <d.s@daniel.shahaf.name> * 41833 + 41838: Completion/Unix/Command/_jq: New completion. 2017-10-13 Peter Stephenson <p.stephenson@samsung.com> - * 41877: Src/subst·c, Test/E01options.ztst: Separate out + * 41877: Src/subst.c, Test/E01options.ztst: Separate out SH_FILE_EXPANSION loop from parameter substitution as the latter can add nodes: SH_FILE_EXPANSION should see following nodes only, but on the next loop parameter substitution needs to see diff --git a/Src/lex.c b/Src/lex.c index 8493d4737..e0190afc6 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -2128,8 +2128,12 @@ skipcomm(void) * function at the history layer --- this is consistent with the * intention of maintaining the history and input layers across * the recursive parsing. + * + * Also turn off LEXFLAGS_NEWLINE because this is already skipping + * across the entire construct, and parse_event() needs embedded + * newlines to be "real" when looking for the OUTPAR token. */ - lexflags &= ~LEXFLAGS_ZLE; + lexflags &= ~(LEXFLAGS_ZLE|LEXFLAGS_NEWLINE); dbparens = 0; /* restored by zcontext_restore_partial() */ if (!parse_event(OUTPAR) || tok != OUTPAR) { |