3 * Description: Bourne-Again shell programming language.
4 * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
7 state bash extends HighlightEntry
17 /* String constants. */
25 /* Ignore escaped quote marks */
36 /* Excutable script. */
38 reference_face (true);
41 reference_face (false);
45 (build-re '(! case do done elif else esac fi for function if in select
46 then until while { } time))
48 /\b(!|case|do(|ne)|e(l(if|se)|sac)|f(i|or|unction)|i(f|n)|select\
49 |t(hen|ime)|until|while|{|})\b/ {
55 /* shell built-in commands
56 (build-re '(: source alias bg bind break builtin cd command continue
57 declare typeset dirs disown echo enable eval exec exit export fc fg
58 getopts hash help history jobs kill let local logout popd pushd pwd read
59 readonly return set shift shopt suspend test times trap type ulimit umask
62 /\b(:|alias|b(g|ind|reak|uiltin)|c(d|o(mmand|ntinue))\
63 |d(eclare|i(rs|sown))|e(cho|nable|val|x(ec|it|port))|f(c|g)|getopts\
64 |h(ash|elp|istory)|jobs|kill|l(et|o(cal|gout))|p(opd|ushd|wd)\
65 |re(ad(|only)|turn)|s(et|h(ift|opt)|ource|uspend)\
66 |t(est|imes|rap|ype(|set))|u(limit|mask|n(alias|set))|wait)\b/ {
72 /* shell variables (built-in)
73 (build-re '(PPID PWD OLDPWD REPLY UID EUID BASH BASH_VERSION BASH_VERSINFO
74 SHLVL RANDOM SECONDS LINENO HISTCMD DIRSTACK PIPESTATUS OPTARG OPTIND
75 HOSTNAME HOSTTYPE OSTYPE MACHTYPE SHELLOPTS IFS PATH HOME CDPATH ENV MAIL
76 MAILCHECK MAILPATH PS1 PS2 PS3 PS4 TIMEFORMAT HISTSIZE HISTFILE
77 HISTFILESIZE OPTERR LANG LC_ALL LC_COLLATE LC_MESSAGES PROMPT_COMMAND
78 IGNOREEOF TMOUT FCEDIT FIGNORE GLOBIGNORE INPUTRC HISTCONTROL HISTIGNORE
79 histchars HOSTFILE auto_resume))
81 /\b(BASH(|_VERSI(NFO|ON))|CDPATH|DIRSTACK|E(NV|UID)|F(CEDIT|IGNORE)\
83 |H(IST(C(MD|ONTROL)|FILE(|SIZE)|IGNORE|SIZE)|O(ME|ST(FILE|NAME|TYPE)))\
84 |I(FS|GNOREEOF|NPUTRC)|L(ANG|C_(ALL|COLLATE|MESSAGES)|INENO)\
85 |MA(CHTYPE|IL(|CHECK|PATH))|O(LDPWD|PT(ARG|ERR|IND)|STYPE)\
86 |P(ATH|IPESTATUS|PID|ROMPT_COMMAND|S(1|2|3|4)|WD)|R(ANDOM|EPLY)\
87 |S(ECONDS|H(ELLOPTS|LVL))|T(IMEFORMAT|MOUT)|UID|auto_resume|histchars)\b/ {
88 variable_name_face (true);
90 variable_name_face (false);