File: tcsh.xml

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (473 lines) | stat: -rw-r--r-- 24,164 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language
[
        <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*">
        <!ENTITY varname  "[A-Za-z_][A-Za-z0-9_]*">
        <!ENTITY word     "[|&amp;;()&lt;&gt;\s]+">	<!-- see man csh -->
        <!ENTITY eos      "(?=($|\s))">			<!-- eol or space following -->
        <!ENTITY noword   "(?![\w$+-])">		<!-- no word, $, + or - following -->
        <!ENTITY pathpart "([\w_@.&#37;*?+-]|\\ )">     <!-- valid character in a file name -->
        <!ENTITY tab      "&#9;">
]>
<language name="Tcsh" version="10" kateversion="5.53" section="Scripts" extensions="*.csh;*.tcsh;csh.cshrc;csh.login;.tcshrc;.cshrc;.login" mimetype="application/x-csh" casesensitive="1" author="Matthew Woehlke (mw_triad@users.sourceforge.net)" license="LGPL">

<!-- (c) 2006 Matthew Woehlke (mw_triad@users.sourceforge.net)
    Based on the bash highlighter by Wilbert Berendsen (wilbert@kde.nl)
    Released under the LGPL -->

  <highlighting>
    <list name="keywords">
      <item>function</item>
      <item>in</item>
      <item>.</item>
    </list>

    <list name="builtins">
      <item>:</item>
      <item>alias</item>
      <item>alloc</item>
      <item>bg</item>
      <item>bindkey</item>
      <item>break</item>
      <item>builtins</item>
      <item>bye</item>
      <item>cd</item>
      <item>chdir</item>
      <item>complete</item>
      <item>continue</item>
      <item>dirs</item>
      <item>echo</item>
      <item>echotc</item>
      <item>eval</item>
      <item>exec</item>
      <item>exit</item>
      <item>fg</item>
      <item>filetest</item>
      <item>glob</item>
      <item>hashstat</item>
      <item>history</item>
      <item>hup</item>
      <item>inlib</item>
      <item>jobs</item>
      <item>kill</item>
      <item>limit</item>
      <item>log</item>
      <item>login</item>
      <item>logout</item>
      <item>ls-F</item>
      <item>migrate</item>
      <item>newgrp</item>
      <item>nice</item>
      <item>nohup</item>
      <item>notify</item>
      <item>onintr</item>
      <item>popd</item>
      <item>printenv</item>
      <item>pushd</item>
      <item>rehash</item>
      <item>repeat</item>
      <item>sched</item>
      <item>settc</item>
      <item>setty</item>
      <item>shift</item>
      <item>source</item>
      <item>stop</item>
      <item>suspend</item>
      <item>telltc</item>
      <item>time</item>
      <item>umask</item>
      <item>unalias</item>
      <item>uncomplete</item>
      <item>unhash</item>
      <item>unlimit</item>
      <item>ver</item>
      <item>wait</item>
      <item>watchlog</item>
      <item>where</item>
      <item>which</item>
    </list>

    <list name="builtins_var">
      <item>unset</item>
      <item>unsetenv</item>
    </list>

    <list name="unixcommands">
      <include>unixcommands##Bash</include>
      <item>command</item>
      <item>pwd</item>
      <item>printf</item>
      <item>test</item>
    </list>


    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Start">
        <IncludeRules context="FindAll" />
      </context>

<!-- ====== The following rulessets are meant to be included ======== -->
      <!-- FindAll tries to interpret everything -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindAll">
        <IncludeRules context="FindComments" />
        <IncludeRules context="FindCommands" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>

      <!-- FindMost tries to interpret anything except commands -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindMost">
        <IncludeRules context="FindComments" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>


      <!-- FindComments consumes shell comments till EOL -->
      <context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
        <DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
        <RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="Comment">
        <DetectSpaces />
        <IncludeRules context="##Comments" />
      </context>

      <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->
<!--      <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">
        <DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
        <RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="CommentParen">
        <RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />
        <IncludeRules context="##Comments" />
      </context> -->

      <!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->
      <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsBackq">
        <DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>
        <RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="CommentBackq">
        <RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />
        <IncludeRules context="##Comments" />
      </context>


      <!-- breaksw case default if else end endif endsw foreach goto
           set setenv switch while -->

      <!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
        <!-- start expression in double parentheses -->
<!--!--><Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
        <!-- start expression in single brackets -->
<!--!--><RegExpr attribute="Builtin" context="ExprBracket" String="(^\[|\s\[)&eos;" beginRegion="expression" column="0"/>
        <!-- start a group command with { -->
<!--!--><RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
        <!-- start a subshell -->
<!--!--><DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell" />
        <!-- match do and if blocks -->
<!--!--><RegExpr attribute="Control Flow" context="If" String="\bif&noword;" />
<!--!--><RegExpr attribute="Control Flow" context="ElseIf" String="\belse\s+if&noword;" />
<!--!--><RegExpr attribute="Control Flow" context="#stay" String="\belse&noword;" />
<!--!--><RegExpr attribute="Control Flow" context="#stay" String="\bendif&noword;" endRegion="if" />
        <!-- handle switch as a special case -->
<!--!--><RegExpr attribute="Control Flow" context="Switch" String="\bswitch&noword;" beginRegion="switch" />
<!--!--><RegExpr attribute="Control Flow" context="#stay" String="\b(foreach|while)&noword;" beginRegion="loop" />
<!--!--><RegExpr attribute="Control Flow" context="#stay" String="\bend&noword;" endRegion="loop" />
        <!-- handle command line options -->
        <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9][A-Za-z0-9_]*|--[a-z][A-Za-z0-9_-]*" />
        <!-- handle variable assignments -->
<!--R--><RegExpr attribute="Keyword" context="#stay" String="\b@\s" />
<!--R--><WordDetect attribute="Keyword" context="#stay" String="set" />
        <WordDetect attribute="Keyword" context="CmdSetEnv" String="setenv" />
        <!-- handle functions with function keyword before keywords -->
<!--!--><StringDetect attribute="Function" context="#stay" String=":()" />
<!--!--><WordDetect attribute="Keyword" context="FunctionDef" String="function" />
        <!-- handle keywords -->
        <keyword attribute="Keyword" context="#stay" String="keywords" />
        <keyword attribute="Builtin" context="#stay" String="builtins" />
        <keyword attribute="Command" context="#stay" String="unixcommands" />
        <!-- handle commands that have variable names as argument -->
        <keyword attribute="Builtin" context="VarName" String="builtins_var" />
        <!-- handle redirection -->
        <RegExpr attribute="Redirection" context="#stay" String="(&lt;&lt;?|&gt;&gt;?&amp;?!?)" />
        <!-- handle &, &&, | and || -->
        <RegExpr attribute="Control" context="#stay" String="([|&amp;])\1?" />
        <!-- mark function definitions without function keyword -->
        <RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" />
      </context>

      <!-- FindOthers contains various rules to mark different shell input -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindOthers">
        <RegExpr attribute="Escape" context="#stay" String="\\[;&quot;\\'$`{}()|&amp;&lt;&gt;* ]" />
<!--?   <RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />-->
        <RegExpr attribute="Path" context="#stay" String="&pathpart;*(?=/)|~\w*|/&pathpart;*(?=([\s/):;$`'&quot;]|$))" />
        <!-- TODO: shell globs -->
      </context>

      <!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
        <DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
        <DetectChar attribute="String DoubleQ" context="StringDQ" char="&quot;" />
        <Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
        <Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1="&quot;" />
      </context>

      <!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions">
        <RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
        <RegExpr attribute="Variable" context="#stay" String="\$(&varname;)|\$[*@#?$!_0-9-]|\$\{[*@#?$!_0-9-]\}|\$\{#&varname;\}|\$\{!&varname;\*?\}" />
        <RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;|\$\{[*@#?$!_0-9-](?=[:#%/])" />
        <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
<!--?   <StringDetect attribute="Redirection" context="SubstFile" String="$(&lt;" />-->
<!--?   <StringDetect attribute="Variable" context="SubstCommand" String="$(" />-->
        <DetectChar attribute="Backquote" context="SubstBackq" char="`" />
        <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
      </context>

      <!-- FindTests finds operators valid in tests -->
      <context attribute="Normal Text" lineEndContext="#stay" name="FindTests">
        <RegExpr attribute="Expression" context="#stay" String="-[rwxXeozsfdlbcpSugktRLDIFNZ](?=\s)|-[AMCUG]:?(?=\s)|-P[0-7]{,3}:?(?=\s)|[=!][~=]|[*>&lt;!~]"/>
      </context>


<!-- ====== These are the contexts that can be branched to ======= -->

      <!-- ExprDblParen consumes an expression started in command mode till )) -->
      <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParen">
        <Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->
      <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst">
        <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- ExprSubParen consumes an expression till ) -->
      <context attribute="Normal Text" lineEndContext="#stay" name="ExprSubParen">
        <DetectChar attribute="Normal Text" context="#pop" char=")" />
        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- ExprBracket consumes an expression till ] -->
      <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracket">
        <RegExpr attribute="Builtin" context="#pop" String="(\s\]|^\])(?=($|[\s;|&amp;]))" endRegion="expression" />
        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
        <IncludeRules context="FindTests" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- Group consumes shell input till } -->
      <context attribute="Normal Text" lineEndContext="#stay" name="Group">
        <DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
        <IncludeRules context="FindAll" />
      </context>

      <!-- SubShell consumes shell input till ) -->
      <context attribute="Normal Text" lineEndContext="#stay" name="SubShell">
        <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
        <IncludeRules context="FindAll" />
      </context>

      <!-- Assign consumes an expression till EOL or whitespace -->
      <context attribute="Normal Text" lineEndContext="#pop" name="Assign" fallthrough="true" fallthroughContext="#pop">
        <DetectChar attribute="Variable" context="AssignArray" char="(" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
        <RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]+" />
      </context>

      <!-- AssignArray consumes everything till ), marking assignments -->
      <context attribute="Normal Text" lineEndContext="#pop" name="AssignArray">
        <DetectChar attribute="Variable" context="#pop" char=")" />
        <DetectChar attribute="Variable" context="Subscript" char="[" />
        <DetectChar attribute="Variable" context="Assign" char="=" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- Subscript consumes anything till ], marks as Variable -->
      <context attribute="Variable" lineEndContext="#stay" name="Subscript">
        <DetectChar attribute="Variable" context="#pop" char="]" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>

      <!-- FunctionDef consumes a name, possibly with (), marks as Function -->
      <context attribute="Function" lineEndContext="#pop" name="FunctionDef" fallthrough="true" fallthroughContext="#pop">
        <RegExpr attribute="Function" context="#pop" String="\s+&funcname;(\s*\(\))?" />
      </context>

      <!-- CmdSetEnv handles the name part of setenv -->
      <context attribute="Normal Text" lineEndContext="#pop" name="CmdSetEnv" fallthrough="true" fallthroughContext="#pop">
        <!-- handle command line options -->
        <RegExpr attribute="Variable" context="#pop" String="\b&varname;" />
        <AnyChar attribute="Variable" context="Assign" String="&tab; " />
        <IncludeRules context="FindMost" />
      </context>

      <!-- VarName consumes spare variable names and assignments -->
      <context attribute="Normal Text" lineEndContext="#pop" name="VarName" fallthrough="true" fallthroughContext="#pop">
        <!-- handle command line options -->
        <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+|--[a-z][A-Za-z0-9_-]*" />
        <RegExpr attribute="Variable" context="#stay" String="\b&varname;" />
        <DetectChar attribute="Variable" context="Subscript" char="[" />
        <DetectChar attribute="Variable" context="Assign" char="=" />
        <IncludeRules context="FindMost" />
        <!-- stay here in spaces and other safe characters -->
        <RegExpr attribute="Normal Text" context="#stay" String="[^]})|;`&amp;&gt;&lt;]" />
      </context>

      <!-- StringSQ consumes anything till ' -->
      <context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">
        <DetectChar attribute="String SingleQ" context="#pop" char="'" />
      </context>

      <!-- StringDQ consumes anything till ", substitutes vars and expressions -->
      <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">
        <DetectChar attribute="String DoubleQ" context="#pop" char="&quot;" />
        <RegExpr attribute="String Escape" context="#stay" String="\\[`&quot;\\$\n]" />
        <IncludeRules context="FindSubstitutions" />
      </context>

      <!-- StringEsc eats till ', but escaping many characters -->
      <context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">
        <DetectChar attribute="String SingleQ" context="#pop" char="'" />
        <RegExpr attribute="String Escape" context="#stay" String="\\[abefnrtv\\']|\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)" />
      </context>

      <!-- VarBrace is called as soon as ${xxx is encoutered -->
      <context attribute="Variable" lineEndContext="#stay" name="VarBrace">
        <DetectChar attribute="Variable" context="#pop" char="}" />
        <DetectChar attribute="Variable" context="Subscript" char="[" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <!-- TODO: highlight various special parameter expansions } -->
      </context>

      <!-- SubstFile is called after a <( or >( is encoutered -->
<!--      <context attribute="Normal Text" lineEndContext="#stay" name="SubstFile">
        <DetectChar attribute="Redirection" context="#pop" char=")" />
        <IncludeRules context="FindCommentsParen" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>
-->
      <!-- SubstCommand is called after a $( is encountered -->
<!--      <context attribute="Normal Text" lineEndContext="#stay" name="SubstCommand">
        <DetectChar attribute="Variable" context="#pop" char=")" />
        <IncludeRules context="FindCommentsParen" />
        <IncludeRules context="FindCommands" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>
-->

      <!-- SubstBackq is called when a backquote is encountered -->
      <context attribute="Normal Text" lineEndContext="#stay" name="SubstBackq">
        <DetectChar attribute="Backquote" context="#pop" char="`" />
        <IncludeRules context="FindCommentsBackq" />
        <IncludeRules context="FindCommands" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>

      <!-- Switch is called after the switch keyword is encoutered. This is
           left over from the bash highlighter where the lonely parentheses
           would otherwise cause trouble. We keep it because it lets us do a
           bit of extra syntax validation. -->
      <context attribute="Normal Text" lineEndContext="#stay" name="Switch">
        <RegExpr attribute="Keyword" context="SwitchCase" String="\scase\b" />
        <RegExpr attribute="Keyword" context="SwitchDefault" String="\sdefault\b" />
        <RegExpr attribute="Keyword" context="#pop" String="\bendsw(?=$|[\s;)])" endRegion="switch" />
        <IncludeRules context="FindMost" />
      </context>

      <context attribute="Normal Text" lineEndContext="#pop" name="If" fallthrough="true" fallthroughContext="#pop">
        <DetectSpaces/>
        <DetectChar attribute="Keyword" context="ArithmeticCondition" char="(" beginRegion="cond" />
        <DetectChar attribute="Variable" context="Subscript" char="[" />
        <StringDetect attribute="Control Flow" context="#pop" String="then" beginRegion="if" />
      </context>

      <context attribute="Normal Text" lineEndContext="#pop" name="ElseIf" fallthrough="true" fallthroughContext="#pop">
        <DetectSpaces/>
        <DetectChar attribute="Keyword" context="ArithmeticCondition" char="(" beginRegion="cond" />
        <DetectChar attribute="Variable" context="Subscript" char="[" />
        <StringDetect attribute="Control Flow" context="#pop" String="then" />
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="ArithmeticCondition">
        <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="cond" />
        <DetectChar attribute="Keyword" context="ArithmeticCondition" char="(" beginRegion="cond" />
        <RegExpr attribute="Expression" context="#stay" String="[=!]~|[=!>&lt;]="/>
        <AnyChar attribute="Expression" context="#stay" String="|^&amp;>&lt;+-*/%!~"/>
        <IncludeRules context="FindComments" />
        <IncludeRules context="FindStrings" />
        <IncludeRules context="FindSubstitutions" />
        <IncludeRules context="FindOthers" />
      </context>

      <!-- SwitchCase is called when the construct 'switch ... case' has been found. -->
      <context attribute="Normal Text" lineEndContext="#stay" name="SwitchCase">
        <DetectChar attribute="Keyword" context="SwitchExpr" char=":" beginRegion="switchexpr" />
        <IncludeRules context="FindMost" />
      </context>

      <!-- SwitchDefault is called when the construct 'switch ... default' has been found. -->
      <context attribute="Normal Text" lineEndContext="#stay" name="SwitchDefault">
        <DetectChar attribute="Keyword" context="SwitchExpr" char=":" beginRegion="switchexpr" />
      </context>

      <!-- SwitchExpr eats shell input till breaksw -->
      <context attribute="Normal Text" lineEndContext="#stay" name="SwitchExpr">
        <RegExpr attribute="Keyword" context="#pop#pop" String="\sbreaksw\b" endRegion="switchexpr" />
        <RegExpr attribute="Keyword" context="#pop#pop" String="\scase\b" endRegion="switchexpr" lookAhead="true" />
        <IncludeRules context="FindAll" />
      </context>

    </contexts>

    <itemDatas>
      <itemData name="Normal Text"	defStyleNum="dsNormal" />
      <itemData name="Comment"		defStyleNum="dsComment" />
      <itemData name="Control Flow" 	defStyleNum="dsControlFlow" spellChecking="false" />
      <itemData name="Keyword" 		defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Control" 		defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Builtin" 		defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Command" 		defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Redirection" 	defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="Escape" 		defStyleNum="dsDataType" spellChecking="false" />
      <itemData name="String SingleQ" 	defStyleNum="dsString" />
      <itemData name="String DoubleQ" 	defStyleNum="dsString" />
      <itemData name="Backquote" 	defStyleNum="dsKeyword" spellChecking="false" />
      <itemData name="String Transl." 	defStyleNum="dsString" spellChecking="false" />
      <itemData name="String Escape" 	defStyleNum="dsDataType" spellChecking="false" />
      <itemData name="Variable" 	defStyleNum="dsOthers" spellChecking="false" />
      <itemData name="Expression" 	defStyleNum="dsOthers" spellChecking="false" />
      <itemData name="Function" 	defStyleNum="dsFunction" spellChecking="false" />
      <itemData name="Path" 		defStyleNum="dsNormal" spellChecking="false" />
      <itemData name="Option" 		defStyleNum="dsNormal" spellChecking="false" />
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="#"/>
    </comments>
    <keywords casesensitive="1" weakDeliminator="^%#[]$._{}:-" additionalDeliminator="`"/>
  </general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->