source: tol/TolJava/WebTOLJavaDEMO/web/sh/scripts/shBrushBash.js

devel
Last change on this file was 9887b93, checked in by Humberto Carralero <hacarralero@…>, 15 years ago

Importing TolJava

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3900 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/**
2 * SyntaxHighlighter
3 * http://alexgorbatchev.com/SyntaxHighlighter
4 *
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 *
8 * @version
9 * 3.0.83 (July 02 2010)
10 *
11 * @copyright
12 * Copyright (C) 2004-2010 Alex Gorbatchev.
13 *
14 * @license
15 * Dual licensed under the MIT and GPL licenses.
16 */
17;(function()
18{
19        // CommonJS
20        typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21
22        function Brush()
23        {
24                var keywords =  'if fi then elif else for do done until while break continue case function return in eq ne ge le';
25                var commands =  'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' +
26                                                'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' +
27                                                'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' +
28                                                'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' +
29                                                'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' +
30                                                'import install join kill less let ln local locate logname logout look lpc lpr lprint ' +
31                                                'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' +
32                                                'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' +
33                                                'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' +
34                                                'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' +
35                                                'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' +
36                                                'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' +
37                                                'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' +
38                                                'vi watch wc whereis which who whoami Wget xargs yes'
39                                                ;
40
41                this.regexList = [
42                        { regex: /^#!.*$/gm,                                                                                    css: 'preprocessor bold' },
43                        { regex: /\/[\w-\/]+/gm,                                                                                css: 'plain' },
44                        { regex: SyntaxHighlighter.regexLib.singleLinePerlComments,             css: 'comments' },              // one line comments
45                        { regex: SyntaxHighlighter.regexLib.doubleQuotedString,                 css: 'string' },                // double quoted strings
46                        { regex: SyntaxHighlighter.regexLib.singleQuotedString,                 css: 'string' },                // single quoted strings
47                        { regex: new RegExp(this.getKeywords(keywords), 'gm'),                  css: 'keyword' },               // keywords
48                        { regex: new RegExp(this.getKeywords(commands), 'gm'),                  css: 'functions' }              // commands
49                        ];
50        }
51
52        Brush.prototype = new SyntaxHighlighter.Highlighter();
53        Brush.aliases   = ['bash', 'shell'];
54
55        SyntaxHighlighter.brushes.Bash = Brush;
56
57        // CommonJS
58        typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
59})();
Note: See TracBrowser for help on using the repository browser.