diff options
| author | Peter Stephenson <pws@zsh.org> | 2016-11-03 10:30:00 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2016-11-03 10:30:00 +0000 |
| commit | 4073a6655cafc78728cb126cfe44e89cc7ba720a (patch) | |
| tree | edfc81de25483aa5b84de0d978180188d94d675a /Src/lex.c | |
| parent | 39811: vi-repeat-change must not be the "motion" of vi-change, lest it infini... (diff) | |
| download | zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar.gz zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar.bz2 zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar.lz zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar.xz zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.tar.zst zsh-4073a6655cafc78728cb126cfe44e89cc7ba720a.zip | |
39815: Read input to end on parse error in $(...) inside a string.
This allows ${(z)} to output the whole string, although we can't do
word splitting from the error onwards.
Diffstat (limited to 'Src/lex.c')
| -rw-r--r-- | Src/lex.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -2138,8 +2138,17 @@ skipcomm(void) lexflags &= ~LEXFLAGS_ZLE; dbparens = 0; /* restored by zcontext_restore_partial() */ - if (!parse_event(OUTPAR) || tok != OUTPAR) - lexstop = 1; + if (!parse_event(OUTPAR) || tok != OUTPAR) { + if (strin) { + /* + * Get the rest of the string raw since we don't + * know where this token ends. + */ + while (!lexstop) + (void)ingetc(); + } else + lexstop = 1; + } /* Outpar lexical token gets added in caller if present */ /* |
