Packages
Packages copied to clipboard
[Bash] Fix pattern termination in parameter expansions
Fixes #3553
If pattern matching or regexp substitution is performed within parameter expansions (e.g.: ${^pattern}) braces must be escaped in order to not terminate the variable expansion.
Braces don't need to be escaped if pattern matching is not part of a parameter expansions.
This commit therefore introduces expansions-parameter-pattern context to ensure any unescaped } pops a context so parameter expansions are properly terminated.