Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[Bash] Fix pattern termination in parameter expansions

Open deathaxe opened this issue 3 years ago • 0 comments

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.

deathaxe avatar Nov 13 '22 14:11 deathaxe