state bash extends HighlightEntry
{
/#/ {
comment_face (true);
language_print ($0);
call (eat_one_line);
comment_face (false);
}
/\"/ {
string_face (true);
language_print ($0);
call (c_string);
string_face (false);
}
/^#!/ {
reference_face (true);
language_print ($0);
call (eat_one_line);
reference_face (false);
}
/\b(!|case|do(|ne)|e(l(if|se)|sac)|f(i|or|unction)|i(f|n)|select\
|t(hen|ime)|until|while|{|})\b/ {
keyword_face (true);
language_print ($0);
keyword_face (false);
}
/\b(:|alias|b(g|ind|reak|uiltin)|c(d|o(mmand|ntinue))\
|d(eclare|i(rs|sown))|e(cho|nable|val|x(ec|it|port))|f(c|g)|getopts\
|h(ash|elp|istory)|jobs|kill|l(et|o(cal|gout))|p(opd|ushd|wd)\
|re(ad(|only)|turn)|s(et|h(ift|opt)|ource|uspend)\
|t(est|imes|rap|ype(|set))|u(limit|mask|n(alias|set))|wait)\b/ {
builtin_face (true);
language_print ($0);
builtin_face (false);
}
/\b(BASH(|_VERSI(NFO|ON))|CDPATH|DIRSTACK|E(NV|UID)|F(CEDIT|IGNORE)\
|GLOBIGNORE\
|H(IST(C(MD|ONTROL)|FILE(|SIZE)|IGNORE|SIZE)|O(ME|ST(FILE|NAME|TYPE)))\
|I(FS|GNOREEOF|NPUTRC)|L(ANG|C_(ALL|COLLATE|MESSAGES)|INENO)\
|MA(CHTYPE|IL(|CHECK|PATH))|O(LDPWD|PT(ARG|ERR|IND)|STYPE)\
|P(ATH|IPESTATUS|PID|ROMPT_COMMAND|S(1|2|3|4)|WD)|R(ANDOM|EPLY)\
|S(ECONDS|H(ELLOPTS|LVL))|T(IMEFORMAT|MOUT)|UID|auto_resume|histchars)\b/ {
variable_name_face (true);
language_print ($0);
variable_name_face (false);
}
}