1 rizwank 1.1 /**
2 * Name: sh
3 * Description: Bourne shell programming language.
4 * Author: Juergen Kahrs <Juergen.Kahrs@t-online.de>
5 */
6
7 state sh extends HighlightEntry
8 {
9 /* Comments. */
10 /#/ {
11 comment_face (true);
12 language_print ($0);
13 call (eat_one_line);
14 comment_face (false);
15 }
16
17 /* String constants. */
18 /\"/ {
19 string_face (true);
20 language_print ($0);
21 call (c_string);
22 rizwank 1.1 string_face (false);
23 }
24
25 /* Excutable script. */
26 /^#!/ {
27 reference_face (true);
28 language_print ($0);
29 call (eat_one_line);
30 reference_face (false);
31 }
32
33 /* Keywords. */
34 /\b(CDPATH|HOME|IFS|MAIL((CHECK)?|(PATH)?)|P(ATH|S(1|2))|SH(ACCT|ELL)|\
35 break|c(ase|d|ontinue)|do(ne)?|e(cho|lse|sac|val|x(ec|it|port))|f(i|or)|\
36 getopts|hash|i[fn]|limit|newgrp|pwd|re(ad(only)?|turn)|s(et|hift)|\
37 t(est|hen|imes|rap|ype)|u(limit|mask|n(limit|set))|w(ait|hile))\b/ {
38 keyword_face (true);
39 language_print ($0);
40 keyword_face (false);
41 }
42 }
43 rizwank 1.1
44
45 /*
46 Local variables:
47 mode: c
48 End:
49 */
|