feat(bash): add missing highlights

This commit is contained in:
Amaan Qureshi 2023-08-24 17:12:10 -04:00
parent 31f608e47b
commit ed2c6da5a0

View file

@ -3,11 +3,14 @@
"{" "}" "{" "}"
"[" "]" "[" "]"
"[[" "]]" "[[" "]]"
"((" "))"
] @punctuation.bracket ] @punctuation.bracket
[ [
";" ";"
";;" ";;"
";&"
";;&"
"&" "&"
] @punctuation.delimiter ] @punctuation.delimiter
@ -18,11 +21,24 @@
"<<" "<<"
"&&" "&&"
"|" "|"
"|&"
"||" "||"
"=" "="
"+="
"=~" "=~"
"==" "=="
"!=" "!="
"&>"
"&>>"
"<&"
">&"
">|"
"<<-"
"<<<"
".."
] @operator ] @operator
; Do *not* spell check strings since they typically have some sort of ; Do *not* spell check strings since they typically have some sort of
@ -42,6 +58,7 @@
] @label ] @label
(variable_assignment (word) @string) (variable_assignment (word) @string)
(command argument: "$" @string) ; bare dollar
[ [
"if" "if"
@ -64,11 +81,13 @@
] @repeat ] @repeat
[ [
"declare" "declare"
"export" "typeset"
"local" "export"
"readonly" "readonly"
"unset" "local"
"unset"
"unsetenv"
] @keyword ] @keyword
"function" @keyword.function "function" @keyword.function
@ -129,9 +148,10 @@
(#lua-match? @number "^[0-9]+$")) (#lua-match? @number "^[0-9]+$"))
(file_redirect (file_redirect
descriptor: (file_descriptor) @operator
destination: (word) @parameter) destination: (word) @parameter)
(file_descriptor) @operator
(simple_expansion (simple_expansion
"$" @punctuation.special) @none "$" @punctuation.special) @none
(expansion (expansion
@ -146,6 +166,8 @@
index: (word) @character.special)) index: (word) @character.special))
(#any-of? @character.special "@" "*")) (#any-of? @character.special "@" "*"))
"``" @punctuation.special
(variable_name) @variable (variable_name) @variable
((variable_name) @constant ((variable_name) @constant
@ -154,7 +176,10 @@
(case_item (case_item
value: (word) @parameter) value: (word) @parameter)
(regex) @string.regex [
(regex)
(extglob_pattern)
] @string.regex
((program . (comment) @preproc) ((program . (comment) @preproc)
(#lua-match? @preproc "^#!/")) (#lua-match? @preproc "^#!/"))