blob: 5e7c2ef8d22e041b2895c6079fdd8a4e129fcfab [file] [log] [blame]
Clement Escoffier07e8d6a2009-07-21 11:44:30 +00001dp.sh.Brushes.Shell = function()
2{
3 var keywords = 'alias array autor base basename break ' +
4 'cat catv cd chdir cmpv continue conv copy ' +
5 'crc ctime cut dirname echo env eval exec else if elif then ' +
6 'export expr extern false fmode fork fprint ' +
7 'fsize fstat fullname global goend goto grep ifdef ' +
8 'ifset ifenv inv kill line link list ' +
9 'local localset mkdirs mktemp move mtime nop print ' +
10 'prints pwd read readc readl readonly rel ' +
11 'remove return seek set shift sleep sortl ' +
12 'static stime sum system systime tee test times ' +
13 'tr trap true type typeset tz umask unalias ' +
14 'unexport unset unsetenv ver wait wc whence ' +
15 'sane exit prompt let';
16
17
18 this.regexList = [
19 { regex: new RegExp('#.*$', 'gm'), css: 'comment' }, // one line
20 { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keyword
21 ];
22
23 this.CssClass = 'dp-shell';
24}
25
26dp.sh.Brushes.Shell.prototype = new dp.sh.Highlighter();
27dp.sh.Brushes.Shell.Aliases = ['shell'];