zsh.st - enscript - GNU Enscript
 (HTM) git clone git://thinkerwim.org/enscript.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       zsh.st (2497B)
       ---
            1 /**
            2  * Name: zsh
            3  * Description: Z-shell programming language.
            4  * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
            5  */
            6 
            7 state zsh 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     string_face (false);
           23   }
           24 
           25   /* Ignore escaped quote marks */
           26   /\\\"/ {
           27     language_print ($0);
           28   }
           29   /\\\'/ {
           30     language_print ($0);
           31   }
           32   /\\\`/ {
           33     language_print ($0);
           34   }
           35 
           36   /* Excutable script. */
           37   /^#!/ {
           38     reference_face (true);
           39     language_print ($0);
           40     call (eat_one_line);
           41     reference_face (false);
           42   }
           43 
           44   /* Keywords:
           45      (build-re '(: noglob nocorrect exec command if then elif else fi for in do
           46      done while until repeat case esac select function time foreach end coproc
           47      return alias autoload bg bindkey break builtin bye cd chdir compctl
           48      continue declare dirs disable disown echo echotc emulate enabke eval exec
           49      exit export false fc fg functions getln getopts hash history integer jobs
           50      kill let limit local log logout popd print pushd pushln pwd read readonly
           51      rehash return sched set setopt shift source suspend test times trap
           52      ttyctl type typeset ulimit umask unalias unfunction unhash unlimit unset
           53      unsetopt vared wait whence where which))
           54   */
           55   /\b(:|a(lias|utoload)|b(g|indkey|reak|uiltin|ye)\
           56 |c(ase|d|hdir|o(m(mand|pctl)|ntinue|proc))\
           57 |d(eclare|i(rs|s(able|own))|o(|ne))\
           58 |e(cho(|tc)|l(if|se)|mulate|n(abke|d)|sac|val|x(ec()|it|port))\
           59 |f(alse|c|g|i|or(|each)|unction(|s))|get(ln|opts)|h(ash|istory)\
           60 |i(f|n(|teger))|jobs|kill|l(et|imit|o(cal|g(|out)))|no(correct|glob)\
           61 |p(opd|rint|ush(d|ln)|wd)|re(ad(|only)|hash|peat|turn())\
           62 |s(ched|e(lect|t(|opt))|hift|ource|uspend)\
           63 |t(est|hen|ime(|s)|rap|tyctl|ype(|set))\
           64 |u(limit|mask|n(alias|function|hash|limit|set(|opt)|til))|vared\
           65 |w(ait|h(e(nce|re)|i(ch|le))))\b/ {
           66     keyword_face (true);
           67     language_print ($0);
           68     keyword_face (false);
           69   }
           70 
           71   /* special functions (built-in)
           72      (build-re '(chpwd precmd periodic argv status signals cdpath fignore
           73      fpath histchars mailpath manpath path psvar prompt watch))
           74   */
           75   /\b(argv|c(dpath|hpwd)|f(ignore|path)|histchars|ma(ilpath|npath)\
           76 |p(ath|eriodic|r(ecmd|ompt)|svar)|s(ignals|tatus)|watch)\b/ {
           77     builtin_face (true);
           78     language_print ($0);
           79     builtin_face (false);
           80   }
           81 }
           82 
           83 
           84 /*
           85 Local variables:
           86 mode: c
           87 End:
           88 */