diff --git a/packages/language-shellscript/grammars/tree-sitter/highlights.scm b/packages/language-shellscript/grammars/tree-sitter/highlights.scm index 031507a766..8c8549738f 100644 --- a/packages/language-shellscript/grammars/tree-sitter/highlights.scm +++ b/packages/language-shellscript/grammars/tree-sitter/highlights.scm @@ -134,7 +134,15 @@ (binary_expression ["&&" "||"] @keyword.operator.logical.shell) (pipeline "|" @keyword.operator.pipe.shell) -(expansion operator: "#" @keyword.operator.expansion.shell) + +; Any expansion operator, including all `#`s and `%`s in the following examples: +; +; foo="${bar#*.}" +; foo="${bar##*.}" +; foo="${bar%*.}" +; foo="${bar%%*.}" +; +(expansion operator: _ @keyword.operator.expansion.shell) ; "*" @keyword.operator.glob.shell