sh
sh copied to clipboard
Quoted backtick command substitution replacement doesn't unescape quotes
Before formatting:
$ echo "`echo \"foobar\"`"
foobar
After formatting:
$ echo "$(echo \"foobar\")"
"foobar"
Solution: quotes in a quoted backtick substitution should be unescaped
$ echo "$(echo "foobar")"
foobar
Seems similar to https://github.com/mvdan/sh/issues/1041, thanks for reporting.