Closed zufuliu closed 9 months ago
Patch to fix the bug: 216.patch
@@ -935,7 +935,9 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int
continue;
}
} else if (sc.ch == QuoteStack.Current.Up) {
- QuoteStack.Current.Count++;
+ if (QuoteStack.Current.Style != QuoteStyle::Parameter) {
+ QuoteStack.Current.Count++;
+ }
} else {
if (QuoteStack.Current.Style == QuoteStyle::String ||
QuoteStack.Current.Style == QuoteStyle::HereDoc ||
option="no[foo]"
option=${option%%[<{().[]*}
echo $option
replacing second {
with }
inside option=${option%%[<{().[]*}
causes syntax errors, so there is no need to detect regex pattern range.
https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion
following code (from
__parse_options()
inside msys2'susr\share\bash-completion\bash_completion
script) is messed by incorrect nesting: