zsh: support double quotes around nested parameter expressions
./shfmt --language-dialect zsh <<<'${(f)"$(foo)"}'
actual
<standard input>:1:6: invalid parameter name
expected
${(f)"$(foo)"}
related
- #1209
- #1208
zsh docs
Note that double quotes may appear around nested expressions, in which case only the part inside is treated as quoted; for example, ${(f)"$(foo)"} quotes the result of $(foo), but the flag ‘(f)’ (see below) is applied using the rules for unquoted expansions.
Source: https://zsh.sourceforge.io/Doc/Release/Expansion.html#Parameter-Expansion#:~:text=Note%20that%20double%20quotes%20may%20appear%20around%20nested%20expressions
I continue to be baffled by the amount of shenanigans that parameter expansions in Zsh allow...
Yeah, it's everything including the kitchen sink, and your kitchen sink, and a whole plumbing supplies store to boot.