Skip to content

Commit

Permalink
[language-shellscript] Highlight all operators in parameter expansions…
Browse files Browse the repository at this point in the history
…not just `#`.
  • Loading branch information
savetheclocktower committed Oct 27, 2024
1 parent 2edb943 commit fea6d4f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fea6d4f

Please sign in to comment.