1[
2 (string)
3 (raw_string)
4 (heredoc_body)
5 (heredoc_start)
6 (ansi_c_string)
7 (word)
8] @string
9
10(variable_name) @variable
11
12[
13 "case"
14 "do"
15 "done"
16 "elif"
17 "else"
18 "esac"
19 "export"
20 "fi"
21 "for"
22 "function"
23 "if"
24 "in"
25 "select"
26 "then"
27 "unset"
28 "until"
29 "while"
30 "local"
31 "declare"
32] @keyword
33
34(comment) @comment
35
36(function_definition name: (word) @function)
37(command_name (word) @function)
38
39[
40 (file_descriptor)
41 (number)
42] @number
43
44(regex) @string.regex
45
46[
47 (command_substitution)
48 (process_substitution)
49 (expansion)
50] @embedded
51
52
53[
54 "$"
55 "&&"
56 ">"
57 ">>"
58 ">&"
59 ">&-"
60 "<"
61 "|"
62 ":"
63 "//"
64 "/"
65 "%"
66 "%%"
67 "#"
68 "##"
69 "="
70 "=="
71] @operator
72
73(test_operator) @keyword.operator
74
75[
76 ";"
77] @punctuation.delimiter
78
79[
80 "("
81 ")"
82 "{"
83 "}"
84 "["
85 "]"
86] @punctuation.bracket
87
88(simple_expansion
89 "$" @punctuation.special)
90(expansion
91 "${" @punctuation.special
92 "}" @punctuation.special) @embedded
93
94(command_substitution
95 "$(" @punctuation.special
96 ")" @punctuation.special)
97
98(
99 (command (_) @constant)
100 (#match? @constant "^-")
101)