forked from matterhorn-chat/matterhorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash.xml
1653 lines (1535 loc) · 86.2 KB
/
bash.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
[
<!ENTITY tab "	">
<!ENTITY funcname "([^&_fragpathseps;}=#$]|[+!@](?!\())([^&_fragpathseps;}=$]*+([+!@](?!\())?+)*+">
<!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">
<!ENTITY eos "(?=$|[ &tab;])"> <!-- eol or space following -->
<!ENTITY eoexpr "(?=$|[ &tab;<>|&;)])">
<!ENTITY substseps "${'"`\\">
<!ENTITY symbolseps "<>|&;()"> <!-- see man bash -->
<!ENTITY wordseps " &tab;&symbolseps;"> <!-- see man bash -->
<!ENTITY _fragpathseps "*?+!@&wordseps;&substseps;">
<!ENTITY _fragpathnosep "(?:[+!@](?!\()|\\.|&_brace_noexpansion;)?+">
<!ENTITY path "(?:[^&_fragpathseps;]*+&_fragpathnosep;)*+">
<!ENTITY fragpath "(?:[^&_fragpathseps;/]*+&_fragpathnosep;)*+">
<!ENTITY opt "(?:[^&_fragpathseps;=/]*+&_fragpathnosep;)*+">
<!ENTITY pathpart "(?:~|\.\.?|&fragpath;)(?:/&path;|(?=[*?]|[+!@]\(|&fragpath;(?:[/*?]|[+!@]\()))|(?:~|\.\.?)(?=[&wordseps;]|$)">
<!ENTITY _fragpathseps_alt "*?+!@&substseps;}">
<!ENTITY _fragpathnosep_alt "(?:[+!@](?!\()|\\.)?+">
<!ENTITY path_alt "(?:[^&_fragpathseps_alt;]*+&_fragpathnosep_alt;)*+">
<!ENTITY fragpath_alt "(?:[^&_fragpathseps_alt;/]*+&_fragpathnosep_alt;)*+">
<!ENTITY opt_alt "(?:[^&_fragpathseps_alt;=/]*+&_fragpathnosep_alt;)*+">
<!ENTITY pathpart_alt "(?:~|\.\.?|&fragpath_alt;)(?:/&path_alt;|(?=[*?]|[+!@]\(|&fragpath_alt;(?:[/*?]|[+!@]\()))|(?:~|\.\.?)(?=\}|$)">
<!ENTITY _braceexpansion_spe " &tab;<>|&;{}\\`'"$">
<!ENTITY _brace_noexpansion "\{[^&_braceexpansion_spe;,]*+\}">
<!ENTITY _braceexpansion_var "\$(?:\{[^\[\]&_braceexpansion_spe;]*+(?:\[[*@a-zA-Z0-9]\])\})?">
<!ENTITY _braceexpansion_string "'[^']*'|"([^"\`]*+|`[^`]*`)*+"">
<!ENTITY _braceexpansion_elems "\\.|`[^`]*`|&_braceexpansion_string;|&_braceexpansion_var;|&_brace_noexpansion;">
<!ENTITY _braceexpansion_consume "&_braceexpansion_elems;|{(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_elems;)*?}|(?R)?+">
<!ENTITY _braceexpansion "(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_consume;)*?,(?:[^&_braceexpansion_spe;]++|&_braceexpansion_consume;)*?}">
<!ENTITY braceexpansion "{&_braceexpansion;">
<!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))">
<!ENTITY arithmetic_as_subshell "\(((?:[^`'"()$]++|\$\{[^`'"(){}$]+\}|\$(?=[^{`'"()])|`[^`]*+`|\((?1)(?:[)]|(?=['"])))++)(?:[)](?=$|[^)])|["'])">
]>
<language name="Bash" version="30" kateversion="5.79" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen ([email protected])" license="LGPL">
<!-- (c) 2004 by Wilbert Berendsen ([email protected])
Changes by Matthew Woehlke ([email protected])
Changes by Sebastian Pipping ([email protected])
Changes by Luiz Angelo Daros de Luca ([email protected])
Released under the LGPL, part of kdelibs/kate -->
<highlighting>
<list name="keywords">
<item>break</item>
<item>case</item>
<item>continue</item>
<item>do</item>
<item>done</item>
<item>elif</item>
<item>else</item>
<item>esac</item>
<item>fi</item>
<item>for</item>
<item>function</item>
<item>if</item>
<item>in</item>
<item>return</item>
<item>select</item>
<item>then</item>
<item>until</item>
<item>while</item>
</list>
<list name="builtins">
<item>.</item>
<item>:</item>
<item>source</item>
<item>alias</item>
<item>bg</item>
<item>bind</item>
<item>builtin</item>
<item>cd</item>
<item>caller</item>
<item>command</item>
<item>compgen</item>
<item>complete</item>
<item>coproc</item>
<item>dirs</item>
<item>disown</item>
<item>echo</item>
<item>enable</item>
<item>eval</item>
<item>exec</item>
<item>exit</item>
<item>fc</item>
<item>fg</item>
<item>hash</item>
<item>help</item>
<item>history</item>
<item>jobs</item>
<item>kill</item>
<item>logout</item>
<item>popd</item>
<item>printf</item>
<item>pushd</item>
<item>pwd</item>
<item>set</item>
<item>shift</item>
<item>shopt</item>
<item>suspend</item>
<item>test</item>
<item>time</item>
<item>times</item>
<item>trap</item>
<item>type</item>
<item>ulimit</item>
<item>umask</item>
<item>unalias</item>
<item>wait</item>
</list>
<list name="builtins_var">
<item>export</item>
<item>declare</item>
<item>getopts</item>
<item>let</item>
<item>local</item>
<item>read</item>
<item>readonly</item>
<item>typeset</item>
<item>unset</item>
</list>
<list name="unixcommands">
<!-- /bin -->
<item>arch</item>
<item>awk</item>
<item>bash</item>
<item>bunzip2</item>
<item>bzcat</item>
<item>bzcmp</item>
<item>bzdiff</item>
<item>bzegrep</item>
<item>bzfgrep</item>
<item>bzgrep</item>
<item>bzip2</item>
<item>bzip2recover</item>
<item>bzless</item>
<item>bzmore</item>
<item>cat</item>
<item>chattr</item>
<item>chgrp</item>
<item>chmod</item>
<item>chown</item>
<item>chvt</item>
<item>cp</item>
<item>date</item>
<item>dd</item>
<item>deallocvt</item>
<item>df</item>
<item>dir</item>
<item>dircolors</item>
<item>dmesg</item>
<item>dnsdomainname</item>
<item>domainname</item>
<item>du</item>
<item>dumpkeys</item>
<item>ed</item>
<item>egrep</item>
<item>false</item>
<item>fgconsole</item>
<item>fgrep</item>
<item>fuser</item>
<item>gawk</item>
<item>getkeycodes</item>
<item>gocr</item>
<item>grep</item>
<item>groff</item>
<item>groups</item>
<item>gunzip</item>
<item>gzexe</item>
<item>gzip</item>
<item>hostname</item>
<item>igawk</item>
<item>install</item>
<item>kbd_mode</item>
<item>kbdrate</item>
<item>killall</item>
<item>last</item>
<item>lastb</item>
<item>link</item>
<item>ln</item>
<item>loadkeys</item>
<item>loadunimap</item>
<item>login</item>
<item>ls</item>
<item>lsattr</item>
<item>lsmod</item>
<item>lsmod.old</item>
<item>lzcat</item>
<item>lzcmp</item>
<item>lzdiff</item>
<item>lzegrep</item>
<item>lzfgrep</item>
<item>lzgrep</item>
<item>lzless</item>
<item>lzma</item>
<item>lzmainfo</item>
<item>lzmore</item>
<item>mapscrn</item>
<item>mesg</item>
<item>mkdir</item>
<item>mkfifo</item>
<item>mknod</item>
<item>mktemp</item>
<item>more</item>
<item>mount</item>
<item>mv</item>
<item>nano</item>
<item>netstat</item>
<item>nisdomainname</item>
<item>nroff</item>
<item>openvt</item>
<item>pgawk</item>
<item>pidof</item>
<item>ping</item>
<item>ps</item>
<item>pstree</item>
<item>rbash</item>
<item>readlink</item>
<item>red</item>
<item>resizecons</item>
<item>rm</item>
<item>rmdir</item>
<item>run-parts</item>
<item>sash</item>
<item>sed</item>
<item>setfont</item>
<item>setkeycodes</item>
<item>setleds</item>
<item>setmetamode</item>
<item>setserial</item>
<item>sh</item>
<item>showkey</item>
<item>shred</item>
<item>sleep</item>
<item>ssed</item>
<item>stat</item>
<item>stty</item>
<item>su</item>
<item>sync</item>
<item>tar</item>
<item>tempfile</item>
<item>touch</item>
<item>troff</item>
<item>true</item>
<item>truncate</item>
<item>umount</item>
<item>uname</item>
<item>unicode_start</item>
<item>unicode_stop</item>
<item>unlink</item>
<item>unlzma</item>
<item>unxz</item>
<item>utmpdump</item>
<item>uuidgen</item>
<item>vdir</item>
<item>wall</item>
<item>wc</item>
<item>xz</item>
<item>xzcat</item>
<item>ypdomainname</item>
<item>zcat</item>
<item>zcmp</item>
<item>zdiff</item>
<item>zegrep</item>
<item>zfgrep</item>
<item>zforce</item>
<item>zgrep</item>
<item>zless</item>
<item>zmore</item>
<item>znew</item>
<item>zsh</item>
<!-- some from /usr/bin -->
<item>aclocal</item>
<item>aconnect</item>
<item>aplay</item>
<item>apm</item>
<item>apmsleep</item>
<item>apropos</item>
<item>ar</item>
<item>arecord</item>
<item>as</item>
<item>as86</item>
<item>autoconf</item>
<item>autoheader</item>
<item>automake</item>
<item>basename</item>
<item>bc</item>
<item>bison</item>
<item>c++</item>
<item>cal</item>
<item>cc</item>
<item>cdda2wav</item>
<item>cdparanoia</item>
<item>cdrdao</item>
<item>cd-read</item>
<item>cdrecord</item>
<item>chfn</item>
<item>chroot</item>
<item>chsh</item>
<item>clear</item>
<item>cmp</item>
<item>co</item>
<item>col</item>
<item>comm</item>
<item>cpio</item>
<item>cpp</item>
<item>cut</item>
<item>dc</item>
<item>diff</item>
<item>diff3</item>
<item>directomatic</item>
<item>dirname</item>
<item>env</item>
<item>expr</item>
<item>fbset</item>
<item>file</item>
<item>find</item>
<item>flex</item>
<item>flex++</item>
<item>fmt</item>
<item>free</item>
<item>ftp</item>
<item>funzip</item>
<item>g++</item>
<item>gc</item>
<item>gcc</item>
<item>clang</item>
<item>valgrind</item>
<item>xdg-open</item>
<item>cmake</item>
<item>qmake</item>
<item>svn</item>
<item>git</item>
<item>rsync</item>
<item>gdb</item>
<item>getent</item>
<item>getopt</item>
<item>gettext</item>
<item>gettextize</item>
<item>gimp</item>
<item>gimp-remote</item>
<item>gimptool</item>
<item>gmake</item>
<item>gs</item>
<item>head</item>
<item>hexdump</item>
<item>id</item>
<item>join</item>
<item>ld</item>
<item>ld86</item>
<item>ldd</item>
<item>less</item>
<item>lex</item>
<item>locate</item>
<item>lockfile</item>
<item>logname</item>
<item>lp</item>
<item>lpr</item>
<item>lynx</item>
<item>m4</item>
<item>make</item>
<item>man</item>
<item>msgfmt</item>
<item>namei</item>
<item>nasm</item>
<item>nawk</item>
<item>nice</item>
<item>nl</item>
<item>nm</item>
<item>nm86</item>
<item>nmap</item>
<item>nohup</item>
<item>nop</item>
<item>od</item>
<item>passwd</item>
<item>patch</item>
<item>pcregrep</item>
<item>pcretest</item>
<item>perl</item>
<item>perror</item>
<item>pr</item>
<item>procmail</item>
<item>prune</item>
<item>ps2ascii</item>
<item>ps2epsi</item>
<item>ps2frag</item>
<item>ps2pdf</item>
<item>ps2ps</item>
<item>psbook</item>
<item>psmerge</item>
<item>psnup</item>
<item>psresize</item>
<item>psselect</item>
<item>pstops</item>
<item>rcs</item>
<item>rev</item>
<item>scp</item>
<item>seq</item>
<item>setterm</item>
<item>size</item>
<item>size86</item>
<item>skill</item>
<item>slogin</item>
<item>snice</item>
<item>sort</item>
<item>sox</item>
<item>split</item>
<item>ssh</item>
<item>ssh-add</item>
<item>ssh-agent</item>
<item>ssh-keygen</item>
<item>ssh-keyscan</item>
<item>strings</item>
<item>strip</item>
<item>sudo</item>
<item>suidperl</item>
<item>sum</item>
<item>tac</item>
<item>tail</item>
<item>tee</item>
<item>tr</item>
<item>tsort</item>
<item>uniq</item>
<item>unzip</item>
<item>updatedb</item>
<item>updmap</item>
<item>uptime</item>
<item>users</item>
<item>vmstat</item>
<item>w</item>
<item>wget</item>
<item>whatis</item>
<item>whereis</item>
<item>which</item>
<item>who</item>
<item>whoami</item>
<item>write</item>
<item>xargs</item>
<item>yacc</item>
<item>yes</item>
<item>zip</item>
<item>zsoelim</item>
<!-- others -->
<item>dcop</item>
<item>kdialog</item>
<item>kfile</item>
<item>xhost</item>
<item>xmodmap</item>
<item>xset</item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Start" fallthroughContext="Command">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<DetectChar attribute="Comment" context="Comment" char="#"/>
<!-- start expression in double parentheses -->
<Detect2Chars context="ExprDblParenOrSubShell" char="(" char1="(" lookAhead="1"/>
<!-- start a subshell -->
<DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell"/>
<!-- start expression in single/double brackets -->
<DetectChar context="MaybeBracketExpression" char="[" lookAhead="1"/>
<!-- start a group command or BraceExpansion with { -->
<DetectChar context="MaybeGroup" char="{" lookAhead="1"/>
<!-- handle ` -->
<DetectChar attribute="Backquote" context="CommandBackq" char="`"/>
<!-- &> and &>> redirection -->
<StringDetect attribute="Redirection" context="WordRedirection" String="&>>"/>
<Detect2Chars attribute="Redirection" context="FdRedirection" char="&" char1=">"/>
<!-- handle branche conditions -->
<Detect2Chars attribute="Control" context="#stay" char="&" char1="&"/>
<Detect2Chars attribute="Control" context="#stay" char="|" char1="|"/>
<!-- handle &, |, ; -->
<AnyChar attribute="Control" context="#stay" String="&|;"/>
<!-- handle variable assignments -->
<RegExpr attribute="Variable" context="VarAssign" String="&varname;(?=\+?=|\[(?:$|[^]]))"/>
<!-- handle keywords -->
<keyword context="DispatchKeyword" String="keywords" lookAhead="1"/>
<!-- handle commands that have variable names as argument -->
<keyword attribute="Builtin" context="VarName" String="builtins_var" lookAhead="1"/>
<!-- mark function definitions without function keyword -->
<RegExpr attribute="Function" context="#stay" String="&funcname;[ &tab;]*\(\)"/>
<keyword attribute="Builtin" context="CommandArgs" String="builtins"/>
<keyword attribute="Command" context="CommandArgs" String="unixcommands"/>
<!-- handle redirection -->
<AnyChar context="CommandMaybeRedirection" String="<>0123456789" lookAhead="1"/>
<AnyChar attribute="Error" context="#stay" String=")}"/>
<LineContinue attribute="Escape" context="#stay"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="MaybeBracketExpression" fallthroughContext="#pop!Command">
<!-- start expression in double brackets -->
<RegExpr attribute="Keyword" context="#pop!ExprDblBracket" String="\[\[(?=$|[ &tab;(])" beginRegion="expression"/>
<!-- start expression in single brackets -->
<RegExpr attribute="Builtin" context="#pop!ExprBracket" String="\[&eos;" beginRegion="expression"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="MaybeGroup">
<!-- start a group command with { -->
<RegExpr attribute="Keyword" context="#pop!Group" String="\{&eos;" beginRegion="group"/>
<DetectChar context="#pop!Command" char="{" lookAhead="1"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="CommandMaybeRedirection" fallthroughContext="#pop!Command">
<IncludeRules context="FindRedirection"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="Return" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
</context>
<!-- Comment consumes shell comments till EOL -->
<context attribute="Comment" lineEndContext="#pop" name="Comment">
<DetectSpaces attribute="Comment"/>
<IncludeRules context="##Comments"/>
<DetectIdentifier attribute="Comment" context="#stay"/>
</context>
<!-- Group is called after a { is encountered -->
<context attribute="Normal Text" lineEndContext="#stay" name="Group" fallthroughContext="Command">
<DetectChar context="MaybeGroupEnd" char="}" lookAhead="1"/>
<IncludeRules context="Start"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="MaybeGroupEnd">
<!-- stop a group command with } -->
<RegExpr attribute="Keyword" context="#pop#pop" String="\}&eoexpr;" endRegion="group"/>
<DetectChar context="#pop!Command" char="}" lookAhead="1"/>
</context>
<context attribute="Command" lineEndContext="#pop" name="Command" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#pop!CommandArgs"/>
<DetectChar context="CommandVariables" char="$" lookAhead="1"/>
<IncludeRules context="FindStrings"/>
<DetectChar context="#pop" char="`" lookAhead="1"/>
<RegExpr attribute="OtherCommand" context="CommandName" String="(?:[^&wordseps;&substseps;]++|\\.)+"/>
<LineContinue attribute="Escape" context="#stay"/>
<DetectChar context="CommandMaybeBraceExpansion" char="{" lookAhead="1"/>
</context>
<context attribute="Command" lineEndContext="#pop#pop" name="CommandVariables">
<IncludeRules context="DispatchVariables"/>
<DetectChar attribute="OtherCommand" context="#pop" char="$"/>
</context>
<context attribute="Command" lineEndContext="#pop#pop" name="DispatchVariables">
<IncludeRules context="DispatchSubstVariables"/>
<IncludeRules context="DispatchStringVariables"/>
<IncludeRules context="DispatchVarnameVariables"/>
</context>
<context attribute="Command" lineEndContext="#pop#pop" name="DispatchSubstVariables">
<Detect2Chars attribute="Parameter Expansion" context="#pop!VarBraceStart" char="$" char1="{"/>
<StringDetect context="#pop!ExprDblParenSubstOrSubstCommand" String="$((" lookAhead="1"/>
<Detect2Chars attribute="Parameter Expansion" context="#pop!SubstCommand" char="$" char1="(" beginRegion="subshell"/>
</context>
<context attribute="Command" lineEndContext="#pop#pop" name="DispatchStringVariables">
<Detect2Chars attribute="String SingleQ" context="#pop!StringEsc" char="$" char1="'"/>
<Detect2Chars attribute="String Transl." context="#pop!StringDQ" char="$" char1="""/>
</context>
<context attribute="Command" lineEndContext="#pop#pop" name="DispatchVarnameVariables">
<RegExpr attribute="Variable" context="#pop" String="\$(?:&varname;|[*@#?$!0-9-])"/>
</context>
<context attribute="OtherCommand" lineEndContext="#pop#pop" name="CommandName">
<DetectSpaces attribute="Normal Text" context="#pop#pop!CommandArgs"/>
<DetectIdentifier attribute="OtherCommand" context="#stay"/>
<DetectChar context="CommandVariables" char="$" lookAhead="1"/>
<IncludeRules context="FindStrings"/>
<Detect2Chars attribute="Control" context="#pop#pop" char="&" char1="&"/>
<Detect2Chars attribute="Control" context="#pop#pop" char="|" char1="|"/>
<DetectChar attribute="Control" context="#pop#pop" char="|"/>
<AnyChar context="#pop#pop" String=";)`" lookAhead="1"/>
<AnyChar context="#pop#pop!CommandArgs" String="&<>" lookAhead="1"/>
<!-- start expression in double parentheses -->
<Detect2Chars attribute="Error" context="#pop#pop!ExprDblParen" char="(" char1="(" beginRegion="expression"/>
<!-- start a subshell -->
<DetectChar attribute="Error" context="#pop#pop!SubShell" char="(" beginRegion="subshell"/>
<LineContinue attribute="Escape" context="#stay"/>
<DetectChar context="#pop!CommandMaybeBraceExpansion" char="{" lookAhead="1"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="CommandMaybeBraceExpansion">
<IncludeRules context="DispatchBraceExpansion"/>
<DetectChar attribute="OtherCommand" context="#pop" char="{"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="CommandBackq" fallthroughContext="Command">
<DetectChar attribute="Backquote" context="#pop!CommandArgs" char="`"/>
<DetectChar attribute="Comment" context="CommentBackq" char="#"/>
<IncludeRules context="Start"/>
</context>
<!-- CommentBackq consumes shell comments till EOL or a backquote -->
<context attribute="Comment" lineEndContext="#pop" name="CommentBackq">
<DetectChar context="#pop" char="`" lookAhead="1"/>
<IncludeRules context="Comment"/>
</context>
<!-- CommandArgs matches the items after a command -->
<context attribute="Normal Text" lineEndContext="#pop" name="CommandArgs" fallthroughContext="CommandArg">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<!-- &> and &>> redirection -->
<StringDetect attribute="Redirection" context="WordRedirection" String="&>>"/>
<Detect2Chars attribute="Redirection" context="FdRedirection" char="&" char1=">"/>
<!-- handle &, |, ;, ` -->
<AnyChar context="#pop" String="&|;`" lookAhead="1"/>
<!-- handle redirection -->
<AnyChar context="CommandArgMaybeRedirection" String="<>0123456789" lookAhead="1"/>
<DetectChar context="#pop" char=")" lookAhead="1"/>
<DetectChar attribute="Error" context="#pop!SubShell" char="("/>
</context>
<context attribute="Normal Text" lineEndContext="#pop#pop" name="CommandArg" fallthroughContext="#pop!NormalOption">
<!-- In command arguments, do not allow comments after escaped characters.
This avoids highlighting comments within paths or other text. Ex: pathtext\ #no\ comment -->
<DetectChar context="#pop#pop" char="#" lookAhead="1"/>
<Detect2Chars attribute="Option" context="#pop!LongOption" char="-" char1="-"/>
<DetectChar attribute="Option" context="#pop!ShortOption" char="-"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="CommandArgMaybeRedirection" fallthroughContext="#pop!NormalOption">
<IncludeRules context="FindRedirection"/>
</context>
<context attribute="Option" lineEndContext="#pop" name="ShortOption" fallthroughContext="#pop">
<DetectChar attribute="Path" context="PathThenPop" char="/"/>
<IncludeRules context="LongOption"/>
</context>
<context attribute="Option" lineEndContext="#pop" name="LongOption" fallthroughContext="#pop">
<AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/>
<DetectChar attribute="Operator" context="#pop!NormalOption" char="="/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindGlobAndPop"/>
<DetectChar context="OptionMaybeBraceExpansion" char="{" lookAhead="1"/>
<RegExpr attribute="Option" context="#stay" String="&opt;"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="NormalOption" fallthroughContext="#pop">
<AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/>
<IncludeRules context="FindWord"/>
<DetectChar context="NormalMaybeBraceExpansion" char="{" lookAhead="1"/>
<IncludeRules context="FindPathThenPop"/>
<IncludeRules context="FindNormalTextOption"/>
</context>
<context attribute="Normal Text" lineEndContext="#stay" name="FindNormalTextOption">
<RegExpr attribute="Normal Text" context="#stay" String="[^&wordseps;&substseps;]+"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="OptionMaybeBraceExpansion">
<IncludeRules context="DispatchBraceExpansion"/>
<DetectChar attribute="Option" context="#pop" char="{"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="NormalMaybeBraceExpansion">
<IncludeRules context="DispatchBraceExpansion"/>
<DetectChar attribute="Normal Text" context="#pop" char="{"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="AssumeEscape">
<LineContinue attribute="Escape" context="#pop"/>
<RegExpr attribute="Escape" context="#pop" String="\\."/>
</context>
<!-- ====== The following rulessets are meant to be included ======== -->
<!-- FindRedirection consumes shell redirection -->
<context attribute="Normal Text" lineEndContext="#pop" name="FindRedirection">
<RegExpr attribute="File Descriptor" context="#pop!AssumeRedirection" String="[0-9]++(?=[<>])"/>
<IncludeRules context="AssumeRedirection"/>
</context>
<!-- DispatchBraceExpansion consumes brace expansions -->
<context attribute="Normal Text" lineEndContext="#pop" name="DispatchBraceExpansion">
<!-- Only highlighting closed braces. The "BraceExpansion" context corrects
the closure of braces and allows recursive braces (bug #387915). -->
<RegExpr context="#pop!BraceExpansion" String="&braceexpansion;" lookAhead="1"/>
<RegExpr attribute="Escape" context="#pop!SequenceExpression" String="{(?=([-+]?[0-9]+\.\.[-+]?[0-9]+|[a-zA-Z]\.\.[a-zA-Z])(\.\.[-+]?[0-9]+)?\})"/>
</context>
<!-- FindPathThenPop consumes path -->
<context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPop">
<IncludeRules context="FindGlobAndPop"/>
<RegExpr attribute="Path" context="PathThenPop" String="&pathpart;"/>
</context>
<context attribute="Path" lineEndContext="#pop" name="FindGlobAndPop">
<IncludeRules context="FindExtGlobAndPop"/>
<AnyChar attribute="Glob" context="PathThenPop" String="?*"/>
</context>
<context attribute="Path" lineEndContext="#pop" name="FindExtGlobAndPop">
<Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="!" char1="("/>
</context>
<context attribute="Path" lineEndContext="#stay" name="ExtGlobAndPop">
<DetectChar attribute="Glob" context="#pop!PathThenPop" char=")"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="IncExtGlob"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="FindExtGlob">
<Detect2Chars attribute="Glob" context="RecursiveExtGlob" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlob" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlob" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlob" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlob" char="!" char1="("/>
<AnyChar attribute="Glob" context="#stay" String="|?*"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="RecursiveExtGlob">
<DetectChar attribute="Glob" context="#pop" char=")"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="IncExtGlob"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="IncExtGlob">
<IncludeRules context="FindExtGlob"/>
<DetectChar context="PathMaybeBraceExpansion" char="{" lookAhead="1"/>
</context>
<context attribute="Path" lineEndContext="#pop#pop" name="PathThenPop">
<AnyChar context="#pop#pop" String="&wordseps;`" lookAhead="1"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlob"/>
<DetectChar context="PathMaybeBraceExpansion" char="{" lookAhead="1"/>
<RegExpr attribute="Path" context="#stay" String="&path;"/>
</context>
<context attribute="Path" lineEndContext="#pop" name="PathMaybeBraceExpansion" fallthroughContext="#pop">
<IncludeRules context="DispatchBraceExpansion"/>
<DetectChar attribute="Path" context="#pop" char="{"/>
</context>
<!-- FindPathThenPopInAlternateValue consumes path in ${xx:here}-->
<context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPopInAlternateValue">
<IncludeRules context="FindExtGlobAndPopInAlternateValue"/>
<AnyChar attribute="Glob" context="PathThenPopInAlternateValue" String="?*"/>
<RegExpr attribute="Path" context="PathThenPopInAlternateValue" String="&pathpart_alt;"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="FindExtGlobAndPopInAlternateValue">
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="ExtGlobAndPopInAlternateValue" char="!" char1="("/>
</context>
<context attribute="Path" lineEndContext="#stay" name="FindExtGlobInAlternateValue">
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="!" char1="("/>
<AnyChar attribute="Glob" context="#stay" String="|?*"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="RecursiveExtGlobInAlternateValue">
<DetectChar attribute="Glob" context="#pop" char=")"/>
<DetectChar context="#pop" char="}" lookAhead="1"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobInAlternateValue"/>
</context>
<context attribute="Path" lineEndContext="#stay" name="ExtGlobAndPopInAlternateValue">
<DetectChar attribute="Glob" context="#pop!PathThenPopInAlternateValue" char=")"/>
<DetectChar attribute="Error" context="#pop#pop" char="}"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobInAlternateValue"/>
</context>
<context attribute="Path" lineEndContext="#pop#pop" name="PathThenPopInAlternateValue">
<DetectChar attribute="Parameter Expansion" context="#pop#pop" char="}"/>
<IncludeRules context="FindWord"/>
<IncludeRules context="FindExtGlobAndPopInAlternateValue"/>
<AnyChar attribute="Glob" context="#stay" String="?*"/>
<RegExpr attribute="Path" context="#stay" String="&path_alt;"/>
</context>
<context attribute="Pattern" lineEndContext="#stay" name="FindPattern">
<Detect2Chars attribute="Glob" context="ExtPattern" char="?" char1="("/>
<Detect2Chars attribute="Glob" context="ExtPattern" char="*" char1="("/>
<Detect2Chars attribute="Glob" context="ExtPattern" char="+" char1="("/>
<Detect2Chars attribute="Glob" context="ExtPattern" char="@" char1="("/>
<Detect2Chars attribute="Glob" context="ExtPattern" char="!" char1="("/>
<AnyChar attribute="Glob" context="#stay" String="?*"/>
</context>
<context attribute="Pattern" lineEndContext="#stay" name="ExtPattern">
<DetectChar attribute="Glob" context="#stay" char="|"/>
<IncludeRules context="FindWord"/>
<DetectChar attribute="Glob" context="#pop" char=")"/>
<IncludeRules context="FindPattern"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="VarAssign" fallthroughContext="#pop">
<DetectChar attribute="Parameter Expansion Operator" context="Subscript" char="["/>
<DetectChar attribute="Operator" context="#pop!Assign" char="="/>
<Detect2Chars attribute="Operator" context="#pop!Assign" char="+" char1="="/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="DispatchKeyword">
<!-- match do and if blocks -->
<Detect2Chars attribute="Control Flow" context="#pop!NotCond" char="i" char1="f" beginRegion="if"/>
<Detect2Chars attribute="Control Flow" context="#pop" char="f" char1="i" endRegion="if"/>
<StringDetect attribute="Control Flow" context="#pop" String="done" endRegion="do"/>
<Detect2Chars attribute="Control Flow" context="#pop" char="d" char1="o" beginRegion="do"/>
<!-- handle while/until as a special case -->
<StringDetect attribute="Control Flow" context="#pop!NotCond" String="while"/>
<StringDetect attribute="Control Flow" context="#pop!NotCond" String="until"/>
<!-- handle for as a special case -->
<StringDetect attribute="Control Flow" context="#pop!For" String="for"/>
<!-- handle select as a special case -->
<StringDetect attribute="Control Flow" context="#pop!For" String="select"/>
<!-- handle case as a special case -->
<StringDetect attribute="Control Flow" context="#pop!Case" String="case" beginRegion="case"/>
<!-- handle functions with function keyword before keywords -->
<StringDetect attribute="Keyword" context="#pop!FunctionDef" String="function"/>
<StringDetect attribute="Control Flow" context="#pop!Return" String="return"/>
<!-- not a keyword in this context -->
<Detect2Chars attribute="Error" context="#pop" char="i" char1="n"/>
<StringDetect attribute="Error" context="#pop" String="esac"/>
<!-- handle keywords -->
<DetectIdentifier attribute="Control Flow" context="#pop"/>
</context>
<!-- if ! ..., while ! ... and until ! ... -->
<context attribute="Normal Text" lineEndContext="#pop" name="NotCond" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#pop!NotCond2"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="NotCond2" fallthroughContext="#pop">
<Detect2Chars attribute="Expression" context="#pop" char="!" char1="&tab;"/>
<Detect2Chars attribute="Expression" context="#pop" char="!" char1=" "/>
<LineContinue attribute="Expression" context="#pop" char="!"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="For" fallthroughContext="#pop">
<LineContinue attribute="Escape" context="#stay"/>
<DetectSpaces attribute="Normal Text" context="#stay"/>
<DetectIdentifier attribute="Normal Text" context="#pop!ForIn"/>
<Detect2Chars attribute="Keyword" context="#pop!ForArithmeticExpr" char="(" char1="("/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="ForIn" fallthroughContext="#pop">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<DetectChar attribute="Control" context="#pop" char=";"/>
<WordDetect attribute="Keyword" context="#pop!CommandArgs" String="in"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="ForArithmeticExpr">
<DetectSpaces attribute="Normal Text" context="#stay"/>
<DetectChar attribute="Control" context="#stay" char=";"/>
<Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")"/>
<IncludeRules context="FindExprDblParen"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="AssumeRedirection">
<!-- handle output redirection -->
<Detect2Chars attribute="Redirection" context="#pop!WordRedirection" char=">" char1=">"/>
<Detect2Chars attribute="Redirection" context="#pop!WordRedirection" char=">" char1="|"/>
<Detect2Chars attribute="Redirection" context="#pop!FdRedirection" char=">" char1="&"/>
<Detect2Chars attribute="Redirection" context="#pop!ProcessSubst" char=">" char1="("/>
<DetectChar attribute="Redirection" context="#pop!WordRedirection" char=">"/>
<StringDetect attribute="Redirection" context="#pop!StringRedirection" String="<<<"/>
<!-- handle here document -->
<Detect2Chars context="#pop!HereDoc" char="<" char1="<" lookAhead="1"/>
<!-- handle input redirection -->
<Detect2Chars attribute="Redirection" context="#pop!FdRedirection" char="<" char1="&"/>
<Detect2Chars attribute="Redirection" context="#pop!WordRedirection" char="<" char1=">"/>
<Detect2Chars attribute="Redirection" context="#pop!ProcessSubst" char="<" char1="("/>
<DetectChar attribute="Redirection" context="#pop!WordRedirection" char="<"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="FdRedirection" fallthroughContext="#pop!FdRedirection2">
<DetectSpaces attribute="Normal Text" context="#pop!FdRedirection2"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="FdRedirection2" fallthroughContext="#pop!WordRedirection2">
<RegExpr attribute="File Descriptor" context="#pop!CloseFile" String="[0-9]+(?=-?&eoexpr;)"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="WordRedirection" fallthroughContext="#pop!WordRedirection2">
<DetectSpaces attribute="Normal Text" context="#pop!WordRedirection2"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="WordRedirection2" fallthroughContext="#pop">
<AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/>
<IncludeRules context="FindWord"/>
<RegExpr attribute="Path" context="PathThenPop" String="&path;"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="StringRedirection" fallthroughContext="#pop!StringRedirection2">
<DetectSpaces attribute="Normal Text" context="#pop!StringRedirection2"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="StringRedirection2">
<AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/>
<IncludeRules context="FindWord"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="CloseFile" fallthroughContext="#pop">
<DetectChar attribute="Keyword" context="#pop" char="-"/>
</context>
<!-- HereDoc consumes Here-documents. It is called at the beginning of the "<<" construct. -->
<context attribute="Normal Text" lineEndContext="#stay" name="HereDoc">
<RegExpr attribute="Redirection" context="HereDocIQ" String="<<-[ &tab;]*&heredocq;(?=[ &tab;]*$)"/>
<RegExpr attribute="Redirection" context="HereDocINQ" String="<<-[ &tab;]*([^&wordseps;]+)(?=[ &tab;]*$)"/>
<RegExpr attribute="Redirection" context="HereDocQ" String="<<[ &tab;]*&heredocq;(?=[ &tab;]*$)"/>
<RegExpr attribute="Redirection" context="HereDocNQ" String="<<[ &tab;]*([^&wordseps;]+)(?=[ &tab;]*$)"/>
<RegExpr context="HereDocIQCmd" String="(<<-[ &tab;]*&heredocq;)" lookAhead="1"/>
<RegExpr context="HereDocINQCmd" String="(<<-[ &tab;]*([^&wordseps;]+))" lookAhead="1"/>
<RegExpr context="HereDocQCmd" String="(<<[ &tab;]*&heredocq;)" lookAhead="1"/>
<RegExpr context="HereDocNQCmd" String="(<<[ &tab;]*([^&wordseps;]+))" lookAhead="1"/>
<Detect2Chars attribute="Redirection" context="#pop" char="<" char1="<"/><!-- always met -->
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="HereDocRemainder" fallthroughContext="Command">
<IncludeRules context="Start"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocQ" dynamic="true" fallthroughContext="HereDocText">
<RegExpr attribute="Redirection" context="#pop#pop" String="^%1$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocNQ" dynamic="true" fallthroughContext="HereDocSubstitutions">
<RegExpr attribute="Redirection" context="#pop#pop" String="^%1$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocIQ" dynamic="true" fallthroughContext="HereDocText">
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%1$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocINQ" dynamic="true" fallthroughContext="HereDocSubstitutions">
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%1$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocQCmd" dynamic="true" fallthroughContext="HereDocText">
<StringDetect attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true"/>
<RegExpr attribute="Redirection" context="#pop#pop" String="^%2$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocNQCmd" dynamic="true" fallthroughContext="HereDocSubstitutions">
<StringDetect attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true"/>
<RegExpr attribute="Redirection" context="#pop#pop" String="^%2$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocIQCmd" dynamic="true" fallthroughContext="HereDocText">
<StringDetect attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true"/>
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%2$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#stay" name="HereDocINQCmd" dynamic="true" fallthroughContext="HereDocSubstitutions">
<StringDetect attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true"/>
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%2$" dynamic="true" column="0"/>
</context>
<context attribute="Here Doc" lineEndContext="#pop" name="HereDocText">
</context>
<context attribute="Here Doc" lineEndContext="#pop" name="HereDocSubstitutions">
<DetectChar context="HereDocVariables" char="$" lookAhead="1"/>
<DetectChar attribute="Backquote" context="CommandBackq" char="`"/>
<DetectChar context="AssumeEscape" char="\" lookAhead="1"/>
</context>
<context attribute="Here Doc" lineEndContext="#pop" name="HereDocVariables">
<IncludeRules context="DispatchSubstVariables"/>
<IncludeRules context="DispatchVarnameVariables"/>
<DetectChar attribute="Here Doc" context="#pop" char="$"/>
</context>
<!-- VarName consumes spare variable names and assignments -->
<context attribute="Normal Text" lineEndContext="#pop" name="VarName">
<StringDetect attribute="Builtin" context="#pop!BuiltinGetopts" String="getopts"/>
<StringDetect attribute="Builtin" context="#pop!BuiltinLet" String="let"/>
<DetectIdentifier attribute="Builtin" context="#pop!VarNameArgs"/>
<AnyChar attribute="Builtin" context="#pop!VarNameArgs" String=".:"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="VarNameArgs" fallthroughContext="#pop!CommandArgs">
<DetectSpaces attribute="Normal Text" context="VarNameArg"/>
<LineContinue attribute="Escape" context="#stay"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop#pop" name="VarNameArg" fallthroughContext="#pop!VarNameArg2">
<!-- In command arguments, do not allow comments after escaped characters.
This avoids highlighting comments within paths or other text. Ex: pathtext\ #no\ comment -->
<DetectChar context="#pop#pop" char="#" lookAhead="1"/>
<DetectChar attribute="Option" context="#pop!ShortOption" char="-"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="VarNameArg2" fallthroughContext="#pop!NormalOption">
<DetectChar attribute="Variable" context="Subscript" char="["/>
<DetectChar attribute="Operator" context="Assign" char="="/>
<DetectChar attribute="Variable" context="AssignArray" char="("/>
<DetectIdentifier attribute="Variable" context="#stay"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="BuiltinGetopts" fallthroughContext="#pop!CommandArgs">
<DetectSpaces attribute="Normal Text" context="#pop!BuiltinGetoptsOpt"/>
<LineContinue attribute="Escape" context="#stay"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop#pop" name="BuiltinGetoptsOpt" fallthroughContext="#pop!BuiltinGetoptsOpt2">
<DetectChar context="#pop#pop" char="#" lookAhead="1"/>
</context>
<context attribute="Normal Text" lineEndContext="#pop" name="BuiltinGetoptsOpt2" fallthroughContext="#pop!NormalOption">
<DetectChar attribute="Operator" context="#stay" char=":"/>
<DetectIdentifier attribute="Normal Text" context="#stay" />
<DetectSpaces attribute="Normal Text" context="#pop!BuiltinGetoptsVar"/>
<AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/>
<IncludeRules context="FindWord"/>
<DetectChar context="NormalMaybeBraceExpansion" char="{" lookAhead="1"/>