tm-grammars 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. package/package.json +46 -0
@@ -0,0 +1,2025 @@
1
+ {
2
+ "displayName": "Shell",
3
+ "name": "shellscript",
4
+ "patterns": [
5
+ {
6
+ "include": "#initial_context"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "alias_statement": {
11
+ "begin": "(alias)[ \\t]*+[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",
12
+ "beginCaptures": {
13
+ "1": {
14
+ "name": "storage.type.alias.shell"
15
+ },
16
+ "2": {
17
+ "name": "storage.modifier.$2.shell"
18
+ },
19
+ "3": {
20
+ "name": "variable.other.assignment.shell"
21
+ },
22
+ "4": {
23
+ "name": "punctuation.definition.array.access.shell"
24
+ },
25
+ "5": {
26
+ "name": "variable.other.assignment.shell"
27
+ },
28
+ "6": {
29
+ "name": "punctuation.definition.array.access.shell"
30
+ },
31
+ "7": {
32
+ "name": "keyword.operator.assignment.shell"
33
+ },
34
+ "8": {
35
+ "name": "keyword.operator.assignment.compound.shell"
36
+ },
37
+ "9": {
38
+ "name": "keyword.operator.assignment.compound.shell"
39
+ }
40
+ },
41
+ "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",
42
+ "endCaptures": {
43
+ "1": {
44
+ "name": "punctuation.terminator.statement.semicolon.shell"
45
+ },
46
+ "2": {
47
+ "name": "punctuation.separator.statement.and.shell"
48
+ },
49
+ "3": {
50
+ "name": "punctuation.separator.statement.or.shell"
51
+ },
52
+ "4": {
53
+ "name": "punctuation.separator.statement.background.shell"
54
+ }
55
+ },
56
+ "name": "meta.expression.assignment.shell",
57
+ "patterns": [
58
+ {
59
+ "include": "#normal_statement_context"
60
+ }
61
+ ]
62
+ },
63
+ "argument": {
64
+ "begin": "[ \\t]++(?!(?:&|\\||\\(|\\[|#|\\n|$|;))",
65
+ "beginCaptures": {
66
+ },
67
+ "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",
68
+ "endCaptures": {
69
+ },
70
+ "name": "meta.argument.shell",
71
+ "patterns": [
72
+ {
73
+ "include": "#argument_context"
74
+ },
75
+ {
76
+ "include": "#line_continuation"
77
+ }
78
+ ]
79
+ },
80
+ "argument_context": {
81
+ "patterns": [
82
+ {
83
+ "captures": {
84
+ "1": {
85
+ "name": "string.unquoted.argument.shell",
86
+ "patterns": [
87
+ {
88
+ "match": "\\*",
89
+ "name": "variable.language.special.wildcard.shell"
90
+ },
91
+ {
92
+ "include": "#variable"
93
+ },
94
+ {
95
+ "include": "#numeric_literal"
96
+ },
97
+ {
98
+ "captures": {
99
+ "1": {
100
+ "name": "constant.language.$1.shell"
101
+ }
102
+ },
103
+ "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)"
104
+ }
105
+ ]
106
+ }
107
+ },
108
+ "match": "[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))"
109
+ },
110
+ {
111
+ "include": "#normal_statement_context"
112
+ }
113
+ ]
114
+ },
115
+ "assignment": {
116
+ "patterns": [
117
+ {
118
+ "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))[ \\t]*+(\\()",
119
+ "beginCaptures": {
120
+ "1": {
121
+ "name": "storage.modifier.$1.shell"
122
+ },
123
+ "2": {
124
+ "name": "variable.other.assignment.shell"
125
+ },
126
+ "3": {
127
+ "name": "punctuation.definition.array.access.shell"
128
+ },
129
+ "4": {
130
+ "name": "variable.other.assignment.shell"
131
+ },
132
+ "5": {
133
+ "name": "punctuation.definition.array.access.shell"
134
+ },
135
+ "6": {
136
+ "name": "keyword.operator.assignment.shell"
137
+ },
138
+ "7": {
139
+ "name": "keyword.operator.assignment.compound.shell"
140
+ },
141
+ "8": {
142
+ "name": "keyword.operator.assignment.compound.shell"
143
+ },
144
+ "9": {
145
+ "name": "punctuation.shell"
146
+ }
147
+ },
148
+ "end": "\\)",
149
+ "endCaptures": {
150
+ "0": {
151
+ "name": "punctuation.shell"
152
+ }
153
+ },
154
+ "name": "meta.expression.assignment.shell",
155
+ "patterns": [
156
+ {
157
+ "include": "#comment"
158
+ },
159
+ {
160
+ "include": "#argument_context"
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))",
166
+ "beginCaptures": {
167
+ "1": {
168
+ "name": "storage.modifier.$1.shell"
169
+ },
170
+ "2": {
171
+ "name": "variable.other.assignment.shell"
172
+ },
173
+ "3": {
174
+ "name": "punctuation.definition.array.access.shell"
175
+ },
176
+ "4": {
177
+ "name": "variable.other.assignment.shell"
178
+ },
179
+ "5": {
180
+ "name": "punctuation.definition.array.access.shell"
181
+ },
182
+ "6": {
183
+ "name": "keyword.operator.assignment.shell"
184
+ },
185
+ "7": {
186
+ "name": "keyword.operator.assignment.compound.shell"
187
+ },
188
+ "8": {
189
+ "name": "keyword.operator.assignment.compound.shell"
190
+ }
191
+ },
192
+ "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))",
193
+ "endCaptures": {
194
+ "1": {
195
+ "name": "punctuation.terminator.statement.semicolon.shell"
196
+ },
197
+ "2": {
198
+ "name": "punctuation.separator.statement.and.shell"
199
+ },
200
+ "3": {
201
+ "name": "punctuation.separator.statement.or.shell"
202
+ },
203
+ "4": {
204
+ "name": "punctuation.separator.statement.background.shell"
205
+ }
206
+ },
207
+ "name": "meta.expression.assignment.shell",
208
+ "patterns": [
209
+ {
210
+ "include": "#comment"
211
+ },
212
+ {
213
+ "include": "#argument_context"
214
+ }
215
+ ]
216
+ }
217
+ ]
218
+ },
219
+ "basic_command_name": {
220
+ "captures": {
221
+ "1": {
222
+ "name": "storage.modifier.$1.shell"
223
+ },
224
+ "2": {
225
+ "name": "entity.name.function.call.shell entity.name.command.shell",
226
+ "patterns": [
227
+ {
228
+ "match": "(?<!\\w)(?:continue|return|break)(?!\\w)",
229
+ "name": "keyword.control.$0.shell"
230
+ },
231
+ {
232
+ "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",
233
+ "name": "support.function.builtin.shell"
234
+ },
235
+ {
236
+ "include": "#variable"
237
+ }
238
+ ]
239
+ }
240
+ },
241
+ "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!\"|'|\\\\\\n?$)[^!'\" \\t\\n\\r]+?))(?:(?= |\\t)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))",
242
+ "name": "meta.statement.command.name.basic.shell"
243
+ },
244
+ "block_comment": {
245
+ "begin": "\\s*+(\\/\\*)",
246
+ "beginCaptures": {
247
+ "1": {
248
+ "name": "punctuation.definition.comment.begin.shell"
249
+ }
250
+ },
251
+ "end": "\\*\\/",
252
+ "endCaptures": {
253
+ "0": {
254
+ "name": "punctuation.definition.comment.end.shell"
255
+ }
256
+ },
257
+ "name": "comment.block.shell"
258
+ },
259
+ "boolean": {
260
+ "match": "\\b(?:true|false)\\b",
261
+ "name": "constant.language.$0.shell"
262
+ },
263
+ "case-clause": {
264
+ "patterns": [
265
+ {
266
+ "begin": "(?=\\S)",
267
+ "end": ";;&?|;&",
268
+ "endCaptures": {
269
+ "0": {
270
+ "name": "punctuation.terminator.case-clause.shell"
271
+ }
272
+ },
273
+ "name": "meta.scope.case-clause.shell",
274
+ "patterns": [
275
+ {
276
+ "begin": "\\(|(?=\\S)",
277
+ "beginCaptures": {
278
+ "0": {
279
+ "name": "punctuation.definition.case-pattern.shell"
280
+ }
281
+ },
282
+ "end": "\\)",
283
+ "endCaptures": {
284
+ "0": {
285
+ "name": "punctuation.definition.case-pattern.shell"
286
+ }
287
+ },
288
+ "name": "meta.scope.case-pattern.shell",
289
+ "patterns": [
290
+ {
291
+ "match": "\\|",
292
+ "name": "punctuation.separator.pipe-sign.shell"
293
+ },
294
+ {
295
+ "include": "#string"
296
+ },
297
+ {
298
+ "include": "#variable"
299
+ },
300
+ {
301
+ "include": "#interpolation"
302
+ },
303
+ {
304
+ "include": "#pathname"
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "begin": "(?<=\\))",
310
+ "end": "(?=;;&?|;&)",
311
+ "name": "meta.scope.case-clause-body.shell",
312
+ "patterns": [
313
+ {
314
+ "include": "#initial_context"
315
+ }
316
+ ]
317
+ }
318
+ ]
319
+ }
320
+ ]
321
+ },
322
+ "comment": {
323
+ "captures": {
324
+ "1": {
325
+ "name": "comment.line.number-sign.shell meta.shebang.shell"
326
+ },
327
+ "2": {
328
+ "name": "punctuation.definition.comment.shebang.shell"
329
+ },
330
+ "3": {
331
+ "name": "comment.line.number-sign.shell"
332
+ },
333
+ "4": {
334
+ "name": "punctuation.definition.comment.shell"
335
+ }
336
+ },
337
+ "match": "(?:^|[ \\t]++)(?:((#!).*)|((#).*))"
338
+ },
339
+ "comments": {
340
+ "patterns": [
341
+ {
342
+ "include": "#block_comment"
343
+ },
344
+ {
345
+ "include": "#line_comment"
346
+ }
347
+ ]
348
+ },
349
+ "compound-command": {
350
+ "patterns": [
351
+ {
352
+ "begin": "\\[{1,2}",
353
+ "beginCaptures": {
354
+ "0": {
355
+ "name": "punctuation.definition.logical-expression.shell"
356
+ }
357
+ },
358
+ "end": "\\]{1,2}",
359
+ "endCaptures": {
360
+ "0": {
361
+ "name": "punctuation.definition.logical-expression.shell"
362
+ }
363
+ },
364
+ "name": "meta.scope.logical-expression.shell",
365
+ "patterns": [
366
+ {
367
+ "include": "#logical-expression"
368
+ },
369
+ {
370
+ "include": "#initial_context"
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "begin": "\\({2}",
376
+ "beginCaptures": {
377
+ "0": {
378
+ "name": "punctuation.definition.string.begin.shell"
379
+ }
380
+ },
381
+ "end": "\\){2}",
382
+ "endCaptures": {
383
+ "0": {
384
+ "name": "punctuation.definition.string.end.shell"
385
+ }
386
+ },
387
+ "name": "string.other.math.shell",
388
+ "patterns": [
389
+ {
390
+ "include": "#math"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "begin": "\\(",
396
+ "beginCaptures": {
397
+ "0": {
398
+ "name": "punctuation.definition.subshell.shell"
399
+ }
400
+ },
401
+ "end": "\\)",
402
+ "endCaptures": {
403
+ "0": {
404
+ "name": "punctuation.definition.subshell.shell"
405
+ }
406
+ },
407
+ "name": "meta.scope.subshell.shell",
408
+ "patterns": [
409
+ {
410
+ "include": "#initial_context"
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "begin": "(?<=\\s|^){(?=\\s|$)",
416
+ "beginCaptures": {
417
+ "0": {
418
+ "name": "punctuation.definition.group.shell"
419
+ }
420
+ },
421
+ "end": "(?<=^|;)\\s*(})",
422
+ "endCaptures": {
423
+ "1": {
424
+ "name": "punctuation.definition.group.shell"
425
+ }
426
+ },
427
+ "name": "meta.scope.group.shell",
428
+ "patterns": [
429
+ {
430
+ "include": "#initial_context"
431
+ }
432
+ ]
433
+ }
434
+ ]
435
+ },
436
+ "continuation_of_double_quoted_command_name": {
437
+ "begin": "\\G(?<=\")",
438
+ "beginCaptures": {
439
+ },
440
+ "contentName": "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command",
441
+ "end": "\"",
442
+ "endCaptures": {
443
+ "0": {
444
+ "name": "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"
445
+ }
446
+ },
447
+ "patterns": [
448
+ {
449
+ "match": "\\\\[\\$\\n`\"\\\\]",
450
+ "name": "constant.character.escape.shell"
451
+ },
452
+ {
453
+ "include": "#variable"
454
+ },
455
+ {
456
+ "include": "#interpolation"
457
+ }
458
+ ]
459
+ },
460
+ "continuation_of_single_quoted_command_name": {
461
+ "begin": "\\G(?<=')",
462
+ "beginCaptures": {
463
+ },
464
+ "contentName": "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command",
465
+ "end": "'",
466
+ "endCaptures": {
467
+ "0": {
468
+ "name": "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"
469
+ }
470
+ }
471
+ },
472
+ "custom_command_names": {
473
+ "patterns": [
474
+ ]
475
+ },
476
+ "custom_commands": {
477
+ "patterns": [
478
+ ]
479
+ },
480
+ "double_quote_context": {
481
+ "patterns": [
482
+ {
483
+ "match": "\\\\[\\$`\"\\\\\\n]",
484
+ "name": "constant.character.escape.shell"
485
+ },
486
+ {
487
+ "include": "#variable"
488
+ },
489
+ {
490
+ "include": "#interpolation"
491
+ }
492
+ ]
493
+ },
494
+ "double_quote_escape_char": {
495
+ "match": "\\\\[\\$`\"\\\\\\n]",
496
+ "name": "constant.character.escape.shell"
497
+ },
498
+ "function_definition": {
499
+ "applyEndPatternLast": 1,
500
+ "begin": "[ \\t]*+(?:(\\bfunction\\b)[ \\t]*+([^ \\t\\n\\r\\(\\)=]+)(?:(\\()[ \\t]*+(\\)))?|([^ \\t\\n\\r\\(\\)=]+)[ \\t]*+(\\()[ \\t]*+(\\)))",
501
+ "beginCaptures": {
502
+ "1": {
503
+ "name": "storage.type.function.shell"
504
+ },
505
+ "2": {
506
+ "name": "entity.name.function.shell"
507
+ },
508
+ "3": {
509
+ "name": "punctuation.definition.arguments.shell"
510
+ },
511
+ "4": {
512
+ "name": "punctuation.definition.arguments.shell"
513
+ },
514
+ "5": {
515
+ "name": "entity.name.function.shell"
516
+ },
517
+ "6": {
518
+ "name": "punctuation.definition.arguments.shell"
519
+ },
520
+ "7": {
521
+ "name": "punctuation.definition.arguments.shell"
522
+ }
523
+ },
524
+ "end": "(?<=\\}|\\))",
525
+ "endCaptures": {
526
+ },
527
+ "name": "meta.function.shell",
528
+ "patterns": [
529
+ {
530
+ "match": "\\G(?:\\t| |\\n)"
531
+ },
532
+ {
533
+ "begin": "\\{",
534
+ "beginCaptures": {
535
+ "0": {
536
+ "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
537
+ }
538
+ },
539
+ "end": "\\}",
540
+ "endCaptures": {
541
+ "0": {
542
+ "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
543
+ }
544
+ },
545
+ "name": "meta.function.body.shell",
546
+ "patterns": [
547
+ {
548
+ "include": "#initial_context"
549
+ }
550
+ ]
551
+ },
552
+ {
553
+ "begin": "\\(",
554
+ "beginCaptures": {
555
+ "0": {
556
+ "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
557
+ }
558
+ },
559
+ "end": "\\)",
560
+ "endCaptures": {
561
+ "0": {
562
+ "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell"
563
+ }
564
+ },
565
+ "name": "meta.function.body.shell",
566
+ "patterns": [
567
+ {
568
+ "include": "#initial_context"
569
+ }
570
+ ]
571
+ }
572
+ ]
573
+ },
574
+ "heredoc": {
575
+ "patterns": [
576
+ {
577
+ "begin": "((?<!<)<<-)[ \\t]*+(\"|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(?:\\2)(.*)",
578
+ "beginCaptures": {
579
+ "1": {
580
+ "name": "keyword.operator.heredoc.shell"
581
+ },
582
+ "2": {
583
+ },
584
+ "3": {
585
+ "name": "punctuation.definition.string.heredoc.shell"
586
+ },
587
+ "4": {
588
+ "patterns": [
589
+ {
590
+ "include": "#normal_statement_context"
591
+ }
592
+ ]
593
+ }
594
+ },
595
+ "contentName": "string.quoted.heredoc.indent",
596
+ "end": "^\\t*(?:\\3)(?=\\s|;|&|$)",
597
+ "endCaptures": {
598
+ "0": {
599
+ "name": "punctuation.definition.string.heredoc.shell"
600
+ }
601
+ },
602
+ "patterns": [
603
+ ]
604
+ },
605
+ {
606
+ "begin": "((?<!<)<<(?!<))[ \\t]*+(\"|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(?:\\2)(.*)",
607
+ "beginCaptures": {
608
+ "1": {
609
+ "name": "keyword.operator.heredoc.shell"
610
+ },
611
+ "2": {
612
+ },
613
+ "3": {
614
+ "name": "punctuation.definition.string.heredoc.shell"
615
+ },
616
+ "4": {
617
+ "patterns": [
618
+ {
619
+ "include": "#normal_statement_context"
620
+ }
621
+ ]
622
+ }
623
+ },
624
+ "contentName": "string.quoted.heredoc.no-indent",
625
+ "end": "^(?:\\3)(?=\\s|;|&|$)",
626
+ "endCaptures": {
627
+ "0": {
628
+ "name": "punctuation.definition.string.heredoc.shell"
629
+ }
630
+ },
631
+ "patterns": [
632
+ ]
633
+ },
634
+ {
635
+ "begin": "((?<!<)<<-)[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(.*)",
636
+ "beginCaptures": {
637
+ "1": {
638
+ "name": "keyword.operator.heredoc.shell"
639
+ },
640
+ "2": {
641
+ "name": "punctuation.definition.string.heredoc.shell"
642
+ },
643
+ "3": {
644
+ "patterns": [
645
+ {
646
+ "include": "#normal_statement_context"
647
+ }
648
+ ]
649
+ }
650
+ },
651
+ "contentName": "string.unquoted.heredoc.indent",
652
+ "end": "^\\t*(?:\\2)(?=\\s|;|&|$)",
653
+ "endCaptures": {
654
+ "0": {
655
+ "name": "punctuation.definition.string.heredoc.shell"
656
+ }
657
+ },
658
+ "patterns": [
659
+ {
660
+ "include": "#double_quote_escape_char"
661
+ },
662
+ {
663
+ "include": "#variable"
664
+ },
665
+ {
666
+ "include": "#interpolation"
667
+ }
668
+ ]
669
+ },
670
+ {
671
+ "begin": "((?<!<)<<(?!<))[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|\"|')(.*)",
672
+ "beginCaptures": {
673
+ "1": {
674
+ "name": "keyword.operator.heredoc.shell"
675
+ },
676
+ "2": {
677
+ "name": "punctuation.definition.string.heredoc.shell"
678
+ },
679
+ "3": {
680
+ "patterns": [
681
+ {
682
+ "include": "#normal_statement_context"
683
+ }
684
+ ]
685
+ }
686
+ },
687
+ "contentName": "string.unquoted.heredoc.no-indent",
688
+ "end": "^(?:\\2)(?=\\s|;|&|$)",
689
+ "endCaptures": {
690
+ "0": {
691
+ "name": "punctuation.definition.string.heredoc.shell"
692
+ }
693
+ },
694
+ "patterns": [
695
+ {
696
+ "include": "#double_quote_escape_char"
697
+ },
698
+ {
699
+ "include": "#variable"
700
+ },
701
+ {
702
+ "include": "#interpolation"
703
+ }
704
+ ]
705
+ }
706
+ ]
707
+ },
708
+ "herestring": {
709
+ "patterns": [
710
+ {
711
+ "begin": "(<<<)\\s*(('))",
712
+ "beginCaptures": {
713
+ "1": {
714
+ "name": "keyword.operator.herestring.shell"
715
+ },
716
+ "2": {
717
+ "name": "string.quoted.single.shell"
718
+ },
719
+ "3": {
720
+ "name": "punctuation.definition.string.begin.shell"
721
+ }
722
+ },
723
+ "contentName": "string.quoted.single.shell",
724
+ "end": "(')",
725
+ "endCaptures": {
726
+ "0": {
727
+ "name": "string.quoted.single.shell"
728
+ },
729
+ "1": {
730
+ "name": "punctuation.definition.string.end.shell"
731
+ }
732
+ },
733
+ "name": "meta.herestring.shell"
734
+ },
735
+ {
736
+ "begin": "(<<<)\\s*((\"))",
737
+ "beginCaptures": {
738
+ "1": {
739
+ "name": "keyword.operator.herestring.shell"
740
+ },
741
+ "2": {
742
+ "name": "string.quoted.double.shell"
743
+ },
744
+ "3": {
745
+ "name": "punctuation.definition.string.begin.shell"
746
+ }
747
+ },
748
+ "contentName": "string.quoted.double.shell",
749
+ "end": "(\")",
750
+ "endCaptures": {
751
+ "0": {
752
+ "name": "string.quoted.double.shell"
753
+ },
754
+ "1": {
755
+ "name": "punctuation.definition.string.end.shell"
756
+ }
757
+ },
758
+ "name": "meta.herestring.shell",
759
+ "patterns": [
760
+ {
761
+ "include": "#double_quote_context"
762
+ }
763
+ ]
764
+ },
765
+ {
766
+ "captures": {
767
+ "1": {
768
+ "name": "keyword.operator.herestring.shell"
769
+ },
770
+ "2": {
771
+ "name": "string.unquoted.herestring.shell",
772
+ "patterns": [
773
+ {
774
+ "include": "#initial_context"
775
+ }
776
+ ]
777
+ }
778
+ },
779
+ "match": "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)",
780
+ "name": "meta.herestring.shell"
781
+ }
782
+ ]
783
+ },
784
+ "initial_context": {
785
+ "patterns": [
786
+ {
787
+ "include": "#comment"
788
+ },
789
+ {
790
+ "include": "#pipeline"
791
+ },
792
+ {
793
+ "include": "#normal_statement_seperator"
794
+ },
795
+ {
796
+ "include": "#logical_expression_double"
797
+ },
798
+ {
799
+ "include": "#logical_expression_single"
800
+ },
801
+ {
802
+ "include": "#misc_ranges"
803
+ },
804
+ {
805
+ "include": "#loop"
806
+ },
807
+ {
808
+ "include": "#function_definition"
809
+ },
810
+ {
811
+ "include": "#variable"
812
+ },
813
+ {
814
+ "include": "#interpolation"
815
+ },
816
+ {
817
+ "include": "#heredoc"
818
+ },
819
+ {
820
+ "include": "#herestring"
821
+ },
822
+ {
823
+ "include": "#redirection"
824
+ },
825
+ {
826
+ "include": "#pathname"
827
+ },
828
+ {
829
+ "include": "#keyword"
830
+ },
831
+ {
832
+ "include": "#alias_statement"
833
+ },
834
+ {
835
+ "include": "#normal_statement"
836
+ },
837
+ {
838
+ "include": "#string"
839
+ },
840
+ {
841
+ "include": "#support"
842
+ }
843
+ ]
844
+ },
845
+ "inline_comment": {
846
+ "captures": {
847
+ "1": {
848
+ "name": "comment.block.shell punctuation.definition.comment.begin.shell"
849
+ },
850
+ "2": {
851
+ "name": "comment.block.shell"
852
+ },
853
+ "3": {
854
+ "patterns": [
855
+ {
856
+ "match": "\\*\\/",
857
+ "name": "comment.block.shell punctuation.definition.comment.end.shell"
858
+ },
859
+ {
860
+ "match": "\\*",
861
+ "name": "comment.block.shell"
862
+ }
863
+ ]
864
+ }
865
+ },
866
+ "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))"
867
+ },
868
+ "interpolation": {
869
+ "patterns": [
870
+ {
871
+ "begin": "\\$\\({2}",
872
+ "beginCaptures": {
873
+ "0": {
874
+ "name": "punctuation.definition.evaluation.arithmetic.begin.shell"
875
+ }
876
+ },
877
+ "end": "\\)\\s*\\)",
878
+ "endCaptures": {
879
+ "0": {
880
+ "name": "punctuation.definition.evaluation.arithmetic.end.shell"
881
+ }
882
+ },
883
+ "name": "string.other.math.shell",
884
+ "patterns": [
885
+ {
886
+ "include": "#math"
887
+ }
888
+ ]
889
+ },
890
+ {
891
+ "begin": "`",
892
+ "beginCaptures": {
893
+ "0": {
894
+ "name": "punctuation.definition.evaluation.backticks.shell"
895
+ }
896
+ },
897
+ "end": "`",
898
+ "endCaptures": {
899
+ "0": {
900
+ "name": "punctuation.definition.evaluation.backticks.shell"
901
+ }
902
+ },
903
+ "name": "string.interpolated.backtick.shell",
904
+ "patterns": [
905
+ {
906
+ "match": "\\\\[`\\\\$]",
907
+ "name": "constant.character.escape.shell"
908
+ },
909
+ {
910
+ "begin": "(?<=\\W)(?=#)(?!#{)",
911
+ "beginCaptures": {
912
+ "1": {
913
+ "name": "punctuation.whitespace.comment.leading.shell"
914
+ }
915
+ },
916
+ "end": "(?!\\G)",
917
+ "patterns": [
918
+ {
919
+ "begin": "#",
920
+ "beginCaptures": {
921
+ "0": {
922
+ "name": "punctuation.definition.comment.shell"
923
+ }
924
+ },
925
+ "end": "(?=`)",
926
+ "name": "comment.line.number-sign.shell"
927
+ }
928
+ ]
929
+ },
930
+ {
931
+ "include": "#initial_context"
932
+ }
933
+ ]
934
+ },
935
+ {
936
+ "begin": "\\$\\(",
937
+ "beginCaptures": {
938
+ "0": {
939
+ "name": "punctuation.definition.evaluation.parens.begin.shell"
940
+ }
941
+ },
942
+ "end": "\\)",
943
+ "endCaptures": {
944
+ "0": {
945
+ "name": "punctuation.definition.evaluation.parens.end.shell"
946
+ }
947
+ },
948
+ "name": "string.interpolated.dollar.shell",
949
+ "patterns": [
950
+ {
951
+ "include": "#initial_context"
952
+ }
953
+ ]
954
+ }
955
+ ]
956
+ },
957
+ "keyword": {
958
+ "patterns": [
959
+ {
960
+ "match": "(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)",
961
+ "name": "keyword.control.$0.shell"
962
+ }
963
+ ]
964
+ },
965
+ "line_comment": {
966
+ "begin": "\\s*+(\\/\\/)",
967
+ "beginCaptures": {
968
+ "1": {
969
+ "name": "punctuation.definition.comment.shell"
970
+ }
971
+ },
972
+ "end": "(?<=\\n)(?<!\\\\\\n)",
973
+ "endCaptures": {
974
+ },
975
+ "name": "comment.line.double-slash.shell",
976
+ "patterns": [
977
+ {
978
+ "include": "#line_continuation_character"
979
+ }
980
+ ]
981
+ },
982
+ "line_continuation": {
983
+ "match": "\\\\(?=\\n)",
984
+ "name": "constant.character.escape.line-continuation.shell"
985
+ },
986
+ "logical-expression": {
987
+ "patterns": [
988
+ {
989
+ "comment": "do we want a special rule for ( expr )?",
990
+ "match": "=[=~]?|!=?|<|>|&&|\\|\\|",
991
+ "name": "keyword.operator.logical.shell"
992
+ },
993
+ {
994
+ "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b",
995
+ "name": "keyword.operator.logical.shell"
996
+ }
997
+ ]
998
+ },
999
+ "logical_expression_context": {
1000
+ "patterns": [
1001
+ {
1002
+ "include": "#regex_comparison"
1003
+ },
1004
+ {
1005
+ "include": "#logical-expression"
1006
+ },
1007
+ {
1008
+ "include": "#logical_expression_single"
1009
+ },
1010
+ {
1011
+ "include": "#logical_expression_double"
1012
+ },
1013
+ {
1014
+ "include": "#comment"
1015
+ },
1016
+ {
1017
+ "include": "#boolean"
1018
+ },
1019
+ {
1020
+ "include": "#redirect_number"
1021
+ },
1022
+ {
1023
+ "include": "#numeric_literal"
1024
+ },
1025
+ {
1026
+ "include": "#pipeline"
1027
+ },
1028
+ {
1029
+ "include": "#normal_statement_seperator"
1030
+ },
1031
+ {
1032
+ "include": "#string"
1033
+ },
1034
+ {
1035
+ "include": "#variable"
1036
+ },
1037
+ {
1038
+ "include": "#interpolation"
1039
+ },
1040
+ {
1041
+ "include": "#heredoc"
1042
+ },
1043
+ {
1044
+ "include": "#herestring"
1045
+ },
1046
+ {
1047
+ "include": "#pathname"
1048
+ },
1049
+ {
1050
+ "include": "#keyword"
1051
+ },
1052
+ {
1053
+ "include": "#support"
1054
+ }
1055
+ ]
1056
+ },
1057
+ "logical_expression_double": {
1058
+ "begin": "\\[\\[",
1059
+ "beginCaptures": {
1060
+ "0": {
1061
+ "name": "punctuation.definition.logical-expression.shell"
1062
+ }
1063
+ },
1064
+ "end": "\\]\\]",
1065
+ "endCaptures": {
1066
+ "0": {
1067
+ "name": "punctuation.definition.logical-expression.shell"
1068
+ }
1069
+ },
1070
+ "name": "meta.scope.logical-expression.shell",
1071
+ "patterns": [
1072
+ {
1073
+ "include": "#logical_expression_context"
1074
+ }
1075
+ ]
1076
+ },
1077
+ "logical_expression_single": {
1078
+ "begin": "\\[",
1079
+ "beginCaptures": {
1080
+ "0": {
1081
+ "name": "punctuation.definition.logical-expression.shell"
1082
+ }
1083
+ },
1084
+ "end": "\\]",
1085
+ "endCaptures": {
1086
+ "0": {
1087
+ "name": "punctuation.definition.logical-expression.shell"
1088
+ }
1089
+ },
1090
+ "name": "meta.scope.logical-expression.shell",
1091
+ "patterns": [
1092
+ {
1093
+ "include": "#logical_expression_context"
1094
+ }
1095
+ ]
1096
+ },
1097
+ "loop": {
1098
+ "patterns": [
1099
+ {
1100
+ "begin": "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})",
1101
+ "beginCaptures": {
1102
+ "1": {
1103
+ "name": "keyword.control.shell"
1104
+ }
1105
+ },
1106
+ "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",
1107
+ "endCaptures": {
1108
+ "0": {
1109
+ "name": "keyword.control.shell"
1110
+ }
1111
+ },
1112
+ "name": "meta.scope.for-loop.shell",
1113
+ "patterns": [
1114
+ {
1115
+ "include": "#initial_context"
1116
+ }
1117
+ ]
1118
+ },
1119
+ {
1120
+ "begin": "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)",
1121
+ "beginCaptures": {
1122
+ "1": {
1123
+ "name": "keyword.control.shell"
1124
+ },
1125
+ "2": {
1126
+ "name": "variable.other.loop.shell",
1127
+ "patterns": [
1128
+ {
1129
+ "include": "#string"
1130
+ }
1131
+ ]
1132
+ },
1133
+ "3": {
1134
+ "name": "keyword.control.shell"
1135
+ }
1136
+ },
1137
+ "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",
1138
+ "endCaptures": {
1139
+ "0": {
1140
+ "name": "keyword.control.shell"
1141
+ }
1142
+ },
1143
+ "name": "meta.scope.for-in-loop.shell",
1144
+ "patterns": [
1145
+ {
1146
+ "include": "#initial_context"
1147
+ }
1148
+ ]
1149
+ },
1150
+ {
1151
+ "begin": "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)",
1152
+ "beginCaptures": {
1153
+ "1": {
1154
+ "name": "keyword.control.shell"
1155
+ }
1156
+ },
1157
+ "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))",
1158
+ "endCaptures": {
1159
+ "0": {
1160
+ "name": "keyword.control.shell"
1161
+ }
1162
+ },
1163
+ "name": "meta.scope.while-loop.shell",
1164
+ "patterns": [
1165
+ {
1166
+ "include": "#initial_context"
1167
+ }
1168
+ ]
1169
+ },
1170
+ {
1171
+ "begin": "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)",
1172
+ "beginCaptures": {
1173
+ "1": {
1174
+ "name": "keyword.control.shell"
1175
+ },
1176
+ "2": {
1177
+ "name": "variable.other.loop.shell"
1178
+ }
1179
+ },
1180
+ "end": "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))",
1181
+ "endCaptures": {
1182
+ "1": {
1183
+ "name": "keyword.control.shell"
1184
+ }
1185
+ },
1186
+ "name": "meta.scope.select-block.shell",
1187
+ "patterns": [
1188
+ {
1189
+ "include": "#initial_context"
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ "begin": "(?<=^|;|&|\\s)case(?=\\s|;|&|$)",
1195
+ "beginCaptures": {
1196
+ "0": {
1197
+ "name": "keyword.control.shell"
1198
+ }
1199
+ },
1200
+ "end": "(?<=^|;|&|\\s)esac(?=\\s|;|&|$)",
1201
+ "endCaptures": {
1202
+ "0": {
1203
+ "name": "keyword.control.shell"
1204
+ }
1205
+ },
1206
+ "name": "meta.scope.case-block.shell",
1207
+ "patterns": [
1208
+ {
1209
+ "begin": "(?<=^|;|&|\\s)in(?=\\s|;|&|$)",
1210
+ "beginCaptures": {
1211
+ "0": {
1212
+ "name": "keyword.control.shell"
1213
+ }
1214
+ },
1215
+ "end": "(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))",
1216
+ "name": "meta.scope.case-body.shell",
1217
+ "patterns": [
1218
+ {
1219
+ "include": "#comment"
1220
+ },
1221
+ {
1222
+ "include": "#case-clause"
1223
+ }
1224
+ ]
1225
+ },
1226
+ {
1227
+ "include": "#initial_context"
1228
+ }
1229
+ ]
1230
+ },
1231
+ {
1232
+ "begin": "(?<=^|;|&|\\s)if(?=\\s|;|&|$)",
1233
+ "beginCaptures": {
1234
+ "0": {
1235
+ "name": "keyword.control.shell"
1236
+ }
1237
+ },
1238
+ "end": "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)",
1239
+ "endCaptures": {
1240
+ "0": {
1241
+ "name": "keyword.control.shell"
1242
+ }
1243
+ },
1244
+ "name": "meta.scope.if-block.shell",
1245
+ "patterns": [
1246
+ {
1247
+ "include": "#initial_context"
1248
+ }
1249
+ ]
1250
+ }
1251
+ ]
1252
+ },
1253
+ "math": {
1254
+ "patterns": [
1255
+ {
1256
+ "include": "#variable"
1257
+ },
1258
+ {
1259
+ "match": "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=",
1260
+ "name": "keyword.operator.arithmetic.shell"
1261
+ },
1262
+ {
1263
+ "match": "0[xX][0-9A-Fa-f]+",
1264
+ "name": "constant.numeric.hex.shell"
1265
+ },
1266
+ {
1267
+ "match": "0\\d+",
1268
+ "name": "constant.numeric.octal.shell"
1269
+ },
1270
+ {
1271
+ "match": "\\d{1,2}#[0-9a-zA-Z@_]+",
1272
+ "name": "constant.numeric.other.shell"
1273
+ },
1274
+ {
1275
+ "match": "\\d+",
1276
+ "name": "constant.numeric.integer.shell"
1277
+ }
1278
+ ]
1279
+ },
1280
+ "misc_ranges": {
1281
+ "patterns": [
1282
+ {
1283
+ "include": "#logical_expression_single"
1284
+ },
1285
+ {
1286
+ "include": "#logical_expression_double"
1287
+ },
1288
+ {
1289
+ "begin": "\\(\\(",
1290
+ "beginCaptures": {
1291
+ "0": {
1292
+ "name": "punctuation.section.arithmetic.shell"
1293
+ }
1294
+ },
1295
+ "end": "\\)\\)",
1296
+ "endCaptures": {
1297
+ "0": {
1298
+ "name": "punctuation.section.arithmetic.shell"
1299
+ }
1300
+ },
1301
+ "name": "meta.arithmetic.shell",
1302
+ "patterns": [
1303
+ {
1304
+ "include": "#math"
1305
+ }
1306
+ ]
1307
+ },
1308
+ {
1309
+ "begin": "(?<!=)\\(",
1310
+ "beginCaptures": {
1311
+ "0": {
1312
+ "name": "punctuation.definition.subshell"
1313
+ }
1314
+ },
1315
+ "end": "\\)",
1316
+ "endCaptures": {
1317
+ "0": {
1318
+ "name": "punctuation.definition.subshell"
1319
+ }
1320
+ },
1321
+ "name": "meta.scope.subshell",
1322
+ "patterns": [
1323
+ {
1324
+ "include": "#initial_context"
1325
+ }
1326
+ ]
1327
+ },
1328
+ {
1329
+ "begin": "(?<![^ \\t])({)",
1330
+ "beginCaptures": {
1331
+ "1": {
1332
+ "name": "punctuation.definition.group.shell"
1333
+ }
1334
+ },
1335
+ "end": "}",
1336
+ "endCaptures": {
1337
+ "0": {
1338
+ "name": "punctuation.definition.group.shell"
1339
+ }
1340
+ },
1341
+ "name": "meta.scope.group.shell",
1342
+ "patterns": [
1343
+ {
1344
+ "include": "#initial_context"
1345
+ }
1346
+ ]
1347
+ }
1348
+ ]
1349
+ },
1350
+ "modifiers": {
1351
+ "match": "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)",
1352
+ "name": "storage.modifier.$0.shell"
1353
+ },
1354
+ "normal_statement": {
1355
+ "begin": "(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)",
1356
+ "beginCaptures": {
1357
+ },
1358
+ "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",
1359
+ "endCaptures": {
1360
+ },
1361
+ "name": "meta.statement.shell",
1362
+ "patterns": [
1363
+ {
1364
+ "include": "#function_definition"
1365
+ },
1366
+ {
1367
+ "include": "#assignment"
1368
+ },
1369
+ {
1370
+ "begin": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)",
1371
+ "beginCaptures": {
1372
+ },
1373
+ "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)",
1374
+ "endCaptures": {
1375
+ },
1376
+ "name": "meta.statement.command.shell",
1377
+ "patterns": [
1378
+ {
1379
+ "begin": "\\G",
1380
+ "beginCaptures": {
1381
+ },
1382
+ "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)",
1383
+ "endCaptures": {
1384
+ },
1385
+ "name": "meta.statement.command.name.shell",
1386
+ "patterns": [
1387
+ {
1388
+ "include": "#modifiers"
1389
+ },
1390
+ {
1391
+ "match": "(?<!\\w)(?:continue|return|break)(?!\\w)",
1392
+ "name": "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"
1393
+ },
1394
+ {
1395
+ "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)",
1396
+ "name": "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"
1397
+ },
1398
+ {
1399
+ "include": "#variable"
1400
+ },
1401
+ {
1402
+ "captures": {
1403
+ "1": {
1404
+ "name": "entity.name.function.call.shell entity.name.command.shell"
1405
+ }
1406
+ },
1407
+ "match": "(?<=\\G|'|\"|\\}|\\))([^ \\n\\t\\r\"'=;&\\|`\\)\\{]+)"
1408
+ },
1409
+ {
1410
+ "begin": "(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))((?:\\$)?)((?:(\")|(')))",
1411
+ "beginCaptures": {
1412
+ "1": {
1413
+ "name": "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"
1414
+ },
1415
+ "2": {
1416
+ },
1417
+ "3": {
1418
+ "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
1419
+ },
1420
+ "4": {
1421
+ "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
1422
+ }
1423
+ },
1424
+ "end": "(?<!\\G)(?<=(?:\\2))",
1425
+ "endCaptures": {
1426
+ },
1427
+ "patterns": [
1428
+ {
1429
+ "include": "#continuation_of_single_quoted_command_name"
1430
+ },
1431
+ {
1432
+ "include": "#continuation_of_double_quoted_command_name"
1433
+ }
1434
+ ]
1435
+ },
1436
+ {
1437
+ "include": "#line_continuation"
1438
+ }
1439
+ ]
1440
+ },
1441
+ {
1442
+ "include": "#line_continuation"
1443
+ },
1444
+ {
1445
+ "include": "#option"
1446
+ },
1447
+ {
1448
+ "include": "#argument"
1449
+ },
1450
+ {
1451
+ "include": "#statement_context"
1452
+ },
1453
+ {
1454
+ "include": "#string"
1455
+ }
1456
+ ]
1457
+ },
1458
+ {
1459
+ "include": "#line_continuation"
1460
+ },
1461
+ {
1462
+ "include": "#normal_statement_context"
1463
+ }
1464
+ ]
1465
+ },
1466
+ "normal_statement_context": {
1467
+ "patterns": [
1468
+ {
1469
+ "include": "#comment"
1470
+ },
1471
+ {
1472
+ "include": "#pipeline"
1473
+ },
1474
+ {
1475
+ "include": "#normal_statement_seperator"
1476
+ },
1477
+ {
1478
+ "include": "#misc_ranges"
1479
+ },
1480
+ {
1481
+ "include": "#boolean"
1482
+ },
1483
+ {
1484
+ "include": "#redirect_number"
1485
+ },
1486
+ {
1487
+ "include": "#numeric_literal"
1488
+ },
1489
+ {
1490
+ "include": "#string"
1491
+ },
1492
+ {
1493
+ "include": "#variable"
1494
+ },
1495
+ {
1496
+ "include": "#interpolation"
1497
+ },
1498
+ {
1499
+ "include": "#heredoc"
1500
+ },
1501
+ {
1502
+ "include": "#herestring"
1503
+ },
1504
+ {
1505
+ "include": "#redirection"
1506
+ },
1507
+ {
1508
+ "include": "#pathname"
1509
+ },
1510
+ {
1511
+ "include": "#keyword"
1512
+ },
1513
+ {
1514
+ "include": "#support"
1515
+ }
1516
+ ]
1517
+ },
1518
+ "normal_statement_seperator": {
1519
+ "captures": {
1520
+ "1": {
1521
+ "name": "punctuation.terminator.statement.semicolon.shell"
1522
+ },
1523
+ "2": {
1524
+ "name": "punctuation.separator.statement.and.shell"
1525
+ },
1526
+ "3": {
1527
+ "name": "punctuation.separator.statement.or.shell"
1528
+ },
1529
+ "4": {
1530
+ "name": "punctuation.separator.statement.background.shell"
1531
+ }
1532
+ },
1533
+ "match": "(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n)"
1534
+ },
1535
+ "numeric_literal": {
1536
+ "captures": {
1537
+ "1": {
1538
+ "name": "constant.numeric.shell constant.numeric.hex.shell"
1539
+ },
1540
+ "2": {
1541
+ "name": "constant.numeric.shell constant.numeric.octal.shell"
1542
+ },
1543
+ "3": {
1544
+ "name": "constant.numeric.shell constant.numeric.other.shell"
1545
+ },
1546
+ "4": {
1547
+ "name": "constant.numeric.shell constant.numeric.integer.shell"
1548
+ },
1549
+ "5": {
1550
+ "name": "constant.numeric.shell constant.numeric.integer.shell"
1551
+ }
1552
+ },
1553
+ "match": "[ \\t]*+(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+\\.\\d+))|(-?\\d+))(?!>)"
1554
+ },
1555
+ "option": {
1556
+ "begin": "[ \\t]++(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t])))",
1557
+ "beginCaptures": {
1558
+ "1": {
1559
+ "name": "string.unquoted.argument.shell constant.other.option.dash.shell"
1560
+ },
1561
+ "2": {
1562
+ "name": "string.unquoted.argument.shell constant.other.option.shell"
1563
+ }
1564
+ },
1565
+ "contentName": "string.unquoted.argument constant.other.option",
1566
+ "end": "(?:(?=[ \\t])|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))",
1567
+ "endCaptures": {
1568
+ },
1569
+ "patterns": [
1570
+ {
1571
+ "include": "#option_context"
1572
+ }
1573
+ ]
1574
+ },
1575
+ "option_context": {
1576
+ "patterns": [
1577
+ {
1578
+ "include": "#misc_ranges"
1579
+ },
1580
+ {
1581
+ "include": "#string"
1582
+ },
1583
+ {
1584
+ "include": "#variable"
1585
+ },
1586
+ {
1587
+ "include": "#interpolation"
1588
+ },
1589
+ {
1590
+ "include": "#heredoc"
1591
+ },
1592
+ {
1593
+ "include": "#herestring"
1594
+ },
1595
+ {
1596
+ "include": "#redirection"
1597
+ },
1598
+ {
1599
+ "include": "#pathname"
1600
+ },
1601
+ {
1602
+ "include": "#keyword"
1603
+ },
1604
+ {
1605
+ "include": "#support"
1606
+ }
1607
+ ]
1608
+ },
1609
+ "pathname": {
1610
+ "patterns": [
1611
+ {
1612
+ "match": "(?<=\\s|:|=|^)~",
1613
+ "name": "keyword.operator.tilde.shell"
1614
+ },
1615
+ {
1616
+ "match": "\\*|\\?",
1617
+ "name": "keyword.operator.glob.shell"
1618
+ },
1619
+ {
1620
+ "begin": "([?*+@!])(\\()",
1621
+ "beginCaptures": {
1622
+ "1": {
1623
+ "name": "keyword.operator.extglob.shell"
1624
+ },
1625
+ "2": {
1626
+ "name": "punctuation.definition.extglob.shell"
1627
+ }
1628
+ },
1629
+ "end": "\\)",
1630
+ "endCaptures": {
1631
+ "0": {
1632
+ "name": "punctuation.definition.extglob.shell"
1633
+ }
1634
+ },
1635
+ "name": "meta.structure.extglob.shell",
1636
+ "patterns": [
1637
+ {
1638
+ "include": "#initial_context"
1639
+ }
1640
+ ]
1641
+ }
1642
+ ]
1643
+ },
1644
+ "pipeline": {
1645
+ "patterns": [
1646
+ {
1647
+ "match": "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)",
1648
+ "name": "keyword.other.shell"
1649
+ },
1650
+ {
1651
+ "match": "[|!]",
1652
+ "name": "keyword.operator.pipe.shell"
1653
+ }
1654
+ ]
1655
+ },
1656
+ "redirect_number": {
1657
+ "captures": {
1658
+ "1": {
1659
+ "name": "keyword.operator.redirect.stdout.shell"
1660
+ },
1661
+ "2": {
1662
+ "name": "keyword.operator.redirect.stderr.shell"
1663
+ },
1664
+ "3": {
1665
+ "name": "keyword.operator.redirect.$3.shell"
1666
+ }
1667
+ },
1668
+ "match": "(?<=[ \\t])(?:(1)|(2)|(\\d+))(?=>)"
1669
+ },
1670
+ "redirection": {
1671
+ "patterns": [
1672
+ {
1673
+ "begin": "[><]\\(",
1674
+ "beginCaptures": {
1675
+ "0": {
1676
+ "name": "punctuation.definition.string.begin.shell"
1677
+ }
1678
+ },
1679
+ "end": "\\)",
1680
+ "endCaptures": {
1681
+ "0": {
1682
+ "name": "punctuation.definition.string.end.shell"
1683
+ }
1684
+ },
1685
+ "name": "string.interpolated.process-substitution.shell",
1686
+ "patterns": [
1687
+ {
1688
+ "include": "#initial_context"
1689
+ }
1690
+ ]
1691
+ },
1692
+ {
1693
+ "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])",
1694
+ "name": "keyword.operator.redirect.shell"
1695
+ }
1696
+ ]
1697
+ },
1698
+ "regex_comparison": {
1699
+ "match": "\\=~",
1700
+ "name": "keyword.operator.logical.regex.shell"
1701
+ },
1702
+ "regexp": {
1703
+ "patterns": [
1704
+ {
1705
+ "match": ".+"
1706
+ }
1707
+ ]
1708
+ },
1709
+ "simple_options": {
1710
+ "captures": {
1711
+ "0": {
1712
+ "patterns": [
1713
+ {
1714
+ "captures": {
1715
+ "1": {
1716
+ "name": "string.unquoted.argument.shell constant.other.option.dash.shell"
1717
+ },
1718
+ "2": {
1719
+ "name": "string.unquoted.argument.shell constant.other.option.shell"
1720
+ }
1721
+ },
1722
+ "match": "[ \\t]++(\\-)(\\w+)"
1723
+ }
1724
+ ]
1725
+ }
1726
+ },
1727
+ "match": "(?:[ \\t]++\\-\\w+)*"
1728
+ },
1729
+ "start_of_command": {
1730
+ "match": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)"
1731
+ },
1732
+ "start_of_double_quoted_command_name": {
1733
+ "captures": {
1734
+ "1": {
1735
+ "name": "entity.name.function.call.shell entity.name.command.shell",
1736
+ "patterns": [
1737
+ {
1738
+ "match": "\\*",
1739
+ "name": "variable.language.special.wildcard.shell"
1740
+ },
1741
+ {
1742
+ "include": "#variable"
1743
+ },
1744
+ {
1745
+ "include": "#numeric_literal"
1746
+ },
1747
+ {
1748
+ "captures": {
1749
+ "1": {
1750
+ "name": "constant.language.$1.shell"
1751
+ }
1752
+ },
1753
+ "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)"
1754
+ }
1755
+ ]
1756
+ }
1757
+ },
1758
+ "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$\")|\")",
1759
+ "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
1760
+ },
1761
+ "start_of_single_quoted_command_name": {
1762
+ "captures": {
1763
+ "1": {
1764
+ "name": "entity.name.function.call.shell entity.name.command.shell",
1765
+ "patterns": [
1766
+ {
1767
+ "match": "\\*",
1768
+ "name": "variable.language.special.wildcard.shell"
1769
+ },
1770
+ {
1771
+ "include": "#variable"
1772
+ },
1773
+ {
1774
+ "include": "#numeric_literal"
1775
+ },
1776
+ {
1777
+ "captures": {
1778
+ "1": {
1779
+ "name": "constant.language.$1.shell"
1780
+ }
1781
+ },
1782
+ "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)"
1783
+ }
1784
+ ]
1785
+ }
1786
+ },
1787
+ "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|')",
1788
+ "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"
1789
+ },
1790
+ "string": {
1791
+ "patterns": [
1792
+ {
1793
+ "match": "\\\\.",
1794
+ "name": "constant.character.escape.shell"
1795
+ },
1796
+ {
1797
+ "begin": "'",
1798
+ "beginCaptures": {
1799
+ "0": {
1800
+ "name": "punctuation.definition.string.begin.shell"
1801
+ }
1802
+ },
1803
+ "end": "'",
1804
+ "endCaptures": {
1805
+ "0": {
1806
+ "name": "punctuation.definition.string.end.shell"
1807
+ }
1808
+ },
1809
+ "name": "string.quoted.single.shell"
1810
+ },
1811
+ {
1812
+ "begin": "\\$?\"",
1813
+ "beginCaptures": {
1814
+ "0": {
1815
+ "name": "punctuation.definition.string.begin.shell"
1816
+ }
1817
+ },
1818
+ "end": "\"",
1819
+ "endCaptures": {
1820
+ "0": {
1821
+ "name": "punctuation.definition.string.end.shell"
1822
+ }
1823
+ },
1824
+ "name": "string.quoted.double.shell",
1825
+ "patterns": [
1826
+ {
1827
+ "match": "\\\\[\\$\\n`\"\\\\]",
1828
+ "name": "constant.character.escape.shell"
1829
+ },
1830
+ {
1831
+ "include": "#variable"
1832
+ },
1833
+ {
1834
+ "include": "#interpolation"
1835
+ }
1836
+ ]
1837
+ },
1838
+ {
1839
+ "begin": "\\$'",
1840
+ "beginCaptures": {
1841
+ "0": {
1842
+ "name": "punctuation.definition.string.begin.shell"
1843
+ }
1844
+ },
1845
+ "end": "'",
1846
+ "endCaptures": {
1847
+ "0": {
1848
+ "name": "punctuation.definition.string.end.shell"
1849
+ }
1850
+ },
1851
+ "name": "string.quoted.single.dollar.shell",
1852
+ "patterns": [
1853
+ {
1854
+ "match": "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')",
1855
+ "name": "constant.character.escape.ansi-c.shell"
1856
+ },
1857
+ {
1858
+ "match": "\\\\[0-9]{3}\"",
1859
+ "name": "constant.character.escape.octal.shell"
1860
+ },
1861
+ {
1862
+ "match": "\\\\x[0-9a-fA-F]{2}\"",
1863
+ "name": "constant.character.escape.hex.shell"
1864
+ },
1865
+ {
1866
+ "match": "\\\\c.\"",
1867
+ "name": "constant.character.escape.control-char.shell"
1868
+ }
1869
+ ]
1870
+ }
1871
+ ]
1872
+ },
1873
+ "support": {
1874
+ "patterns": [
1875
+ {
1876
+ "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)",
1877
+ "name": "support.function.builtin.shell"
1878
+ }
1879
+ ]
1880
+ },
1881
+ "variable": {
1882
+ "patterns": [
1883
+ {
1884
+ "captures": {
1885
+ "1": {
1886
+ "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell"
1887
+ },
1888
+ "2": {
1889
+ "name": "variable.parameter.positional.all.shell"
1890
+ }
1891
+ },
1892
+ "match": "(\\$)(\\@(?!\\w))"
1893
+ },
1894
+ {
1895
+ "captures": {
1896
+ "1": {
1897
+ "name": "punctuation.definition.variable.shell variable.parameter.positional.shell"
1898
+ },
1899
+ "2": {
1900
+ "name": "variable.parameter.positional.shell"
1901
+ }
1902
+ },
1903
+ "match": "(\\$)([0-9](?!\\w))"
1904
+ },
1905
+ {
1906
+ "captures": {
1907
+ "1": {
1908
+ "name": "punctuation.definition.variable.shell variable.language.special.shell"
1909
+ },
1910
+ "2": {
1911
+ "name": "variable.language.special.shell"
1912
+ }
1913
+ },
1914
+ "match": "(\\$)([-*#?$!0_](?!\\w))"
1915
+ },
1916
+ {
1917
+ "begin": "(\\$)(\\{)[ \\t]*+(?=\\d)",
1918
+ "beginCaptures": {
1919
+ "1": {
1920
+ "name": "punctuation.definition.variable.shell variable.parameter.positional.shell"
1921
+ },
1922
+ "2": {
1923
+ "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"
1924
+ }
1925
+ },
1926
+ "contentName": "meta.parameter-expansion",
1927
+ "end": "\\}",
1928
+ "endCaptures": {
1929
+ "0": {
1930
+ "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"
1931
+ }
1932
+ },
1933
+ "patterns": [
1934
+ {
1935
+ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/",
1936
+ "name": "keyword.operator.expansion.shell"
1937
+ },
1938
+ {
1939
+ "captures": {
1940
+ "1": {
1941
+ "name": "punctuation.section.array.shell"
1942
+ },
1943
+ "2": {
1944
+ "name": "punctuation.section.array.shell"
1945
+ }
1946
+ },
1947
+ "match": "(\\[)[^\\]]+(\\])"
1948
+ },
1949
+ {
1950
+ "match": "[0-9]+",
1951
+ "name": "variable.parameter.positional.shell"
1952
+ },
1953
+ {
1954
+ "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",
1955
+ "name": "variable.other.normal.shell"
1956
+ },
1957
+ {
1958
+ "include": "#variable"
1959
+ },
1960
+ {
1961
+ "include": "#string"
1962
+ }
1963
+ ]
1964
+ },
1965
+ {
1966
+ "begin": "(\\$)(\\{)",
1967
+ "beginCaptures": {
1968
+ "1": {
1969
+ "name": "punctuation.definition.variable.shell"
1970
+ },
1971
+ "2": {
1972
+ "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"
1973
+ }
1974
+ },
1975
+ "contentName": "meta.parameter-expansion",
1976
+ "end": "\\}",
1977
+ "endCaptures": {
1978
+ "0": {
1979
+ "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"
1980
+ }
1981
+ },
1982
+ "patterns": [
1983
+ {
1984
+ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/",
1985
+ "name": "keyword.operator.expansion.shell"
1986
+ },
1987
+ {
1988
+ "captures": {
1989
+ "1": {
1990
+ "name": "punctuation.section.array.shell"
1991
+ },
1992
+ "2": {
1993
+ "name": "punctuation.section.array.shell"
1994
+ }
1995
+ },
1996
+ "match": "(\\[)[^\\]]+(\\])"
1997
+ },
1998
+ {
1999
+ "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)",
2000
+ "name": "variable.other.normal.shell"
2001
+ },
2002
+ {
2003
+ "include": "#variable"
2004
+ },
2005
+ {
2006
+ "include": "#string"
2007
+ }
2008
+ ]
2009
+ },
2010
+ {
2011
+ "captures": {
2012
+ "1": {
2013
+ "name": "punctuation.definition.variable.shell variable.other.normal.shell"
2014
+ },
2015
+ "2": {
2016
+ "name": "variable.other.normal.shell"
2017
+ }
2018
+ },
2019
+ "match": "(\\$)(\\w+(?!\\w))"
2020
+ }
2021
+ ]
2022
+ }
2023
+ },
2024
+ "scopeName": "source.shell"
2025
+ }