mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
The regression is: quoting.sh[189]: expansion of "{q:+'}" not correct when q unset The failure was that, for unset q, "${q:+'}q${q:+'}" yielded empty and not 'q'. This is because the single quotes within the double quotes were erroneously parsed as meaningful. The originally used ST_QUOTE state table (see data/lexstates.c), where no quote character has any special meaning, was for avoiding this problem. The newly introduced ST_MOD1 state table is a copy of ST_QUOTE except the ' has been given its special meaning back. We need this to fix #290, but only for unquoted expansions. So we need to go back to using ST_QUOTE if the string is quoted (mp->quote) and we're not parsing a substitution that uses patterns where quotes are significant (newops, ST_MOD2), i.e., only for old-style ST_MOD1 operators. src/cmd/ksh93/sh/macro.c: varsub(): - When the ${var<OP>string} expansion is quoted, and of an old (S_MOD1) type, then use the ST_QUOTE state table to skip over it instead of the new ST_MOD1 one. |
||
---|---|---|
.. | ||
builtin | ||
INIT | ||
ksh93 | ||
Mamfile |