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