|
1 | | -/** |
2 | | - * SyntaxHighlighter |
3 | | - * http://alexgorbatchev.com/ |
4 | | - * |
5 | | - * SyntaxHighlighter is donationware. If you are using it, please donate. |
6 | | - * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate |
7 | | - * |
8 | | - * @version |
9 | | - * 2.1.364 (October 15 2009) |
10 | | - * |
11 | | - * @copyright |
12 | | - * Copyright (C) 2004-2009 Alex Gorbatchev. |
13 | | - * |
14 | | - * @license |
15 | | - * This file is part of SyntaxHighlighter. |
16 | | - * |
17 | | - * SyntaxHighlighter is free software: you can redistribute it and/or modify |
18 | | - * it under the terms of the GNU Lesser General Public License as published by |
19 | | - * the Free Software Foundation, either version 3 of the License, or |
20 | | - * (at your option) any later version. |
21 | | - * |
22 | | - * SyntaxHighlighter is distributed in the hope that it will be useful, |
23 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
24 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
25 | | - * GNU General Public License for more details. |
26 | | - * |
27 | | - * You should have received a copy of the GNU General Public License |
28 | | - * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>. |
29 | | - */ |
30 | | -SyntaxHighlighter.brushes.Bash = function() |
31 | | -{ |
32 | | - var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le'; |
33 | | - var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' + |
34 | | - 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' + |
35 | | - 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + |
36 | | - 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + |
37 | | - 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' + |
38 | | - 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + |
39 | | - 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + |
40 | | - 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' + |
41 | | - 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + |
42 | | - 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + |
43 | | - 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' + |
44 | | - 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + |
45 | | - 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + |
46 | | - 'vi watch wc whereis which who whoami Wget xargs yes' |
47 | | - ; |
48 | | - |
49 | | - this.findMatches = function(regexList, code) |
50 | | - { |
51 | | - code = code.replace(/>/g, '>').replace(/</g, '<'); |
52 | | - this.code = code; |
53 | | - return SyntaxHighlighter.Highlighter.prototype.findMatches.apply(this, [regexList, code]); |
54 | | - }; |
55 | | - |
56 | | - this.regexList = [ |
57 | | - { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments |
58 | | - { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings |
59 | | - { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings |
60 | | - { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords |
61 | | - { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands |
62 | | - ]; |
63 | | -} |
64 | | - |
65 | | -SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter(); |
66 | | -SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell']; |
| 1 | +/** |
| 2 | + * SyntaxHighlighter |
| 3 | + * http://alexgorbatchev.com/ |
| 4 | + * |
| 5 | + * SyntaxHighlighter is donationware. If you are using it, please donate. |
| 6 | + * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate |
| 7 | + * |
| 8 | + * @version |
| 9 | + * 2.1.364 (October 15 2009) |
| 10 | + * |
| 11 | + * @copyright |
| 12 | + * Copyright (C) 2004-2009 Alex Gorbatchev. |
| 13 | + * |
| 14 | + * @license |
| 15 | + * This file is part of SyntaxHighlighter. |
| 16 | + * |
| 17 | + * SyntaxHighlighter is free software: you can redistribute it and/or modify |
| 18 | + * it under the terms of the GNU Lesser General Public License as published by |
| 19 | + * the Free Software Foundation, either version 3 of the License, or |
| 20 | + * (at your option) any later version. |
| 21 | + * |
| 22 | + * SyntaxHighlighter is distributed in the hope that it will be useful, |
| 23 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 | + * GNU General Public License for more details. |
| 26 | + * |
| 27 | + * You should have received a copy of the GNU General Public License |
| 28 | + * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>. |
| 29 | + */ |
| 30 | +SyntaxHighlighter.brushes.Bash = function() |
| 31 | +{ |
| 32 | + var keywords = 'if fi then elif else for do done until while break continue case function return in eq ne gt lt ge le'; |
| 33 | + var commands = 'alias apropos awk basename bash bc bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot' + |
| 34 | + 'cksum clear cmp comm command cp cron crontab csplit cut date dc dd ddrescue declare df ' + |
| 35 | + 'diff diff3 dig dir dircolors dirname dirs du echo egrep eject enable env ethtool eval ' + |
| 36 | + 'exec exit expand export expr false fdformat fdisk fg fgrep file find fmt fold format ' + |
| 37 | + 'free fsck ftp gawk getopts grep groups gzip hash head history hostname id ifconfig ' + |
| 38 | + 'import install join kill less let ln local locate logname logout look lpc lpr lprint ' + |
| 39 | + 'lprintd lprintq lprm ls lsof make man mkdir mkfifo mkisofs mknod more mount mtools ' + |
| 40 | + 'mv netstat nice nl nohup nslookup open op passwd paste pathchk ping popd pr printcap ' + |
| 41 | + 'printenv printf ps pushd pwd quota quotacheck quotactl ram rcp read readonly renice ' + |
| 42 | + 'remsync rm rmdir rsync screen scp sdiff sed select seq set sftp shift shopt shutdown ' + |
| 43 | + 'sleep sort source split ssh strace su sudo sum symlink sync tail tar tee test time ' + |
| 44 | + 'times touch top traceroute trap tr true tsort tty type ulimit umask umount unalias ' + |
| 45 | + 'uname unexpand uniq units unset unshar useradd usermod users uuencode uudecode v vdir ' + |
| 46 | + 'vi watch wc whereis which who whoami Wget xargs yes' |
| 47 | + ; |
| 48 | + |
| 49 | + this.findMatches = function(regexList, code) |
| 50 | + { |
| 51 | + code = code.replace(/>/g, '>').replace(/</g, '<'); |
| 52 | + this.code = code; |
| 53 | + return SyntaxHighlighter.Highlighter.prototype.findMatches.apply(this, [regexList, code]); |
| 54 | + }; |
| 55 | + |
| 56 | + this.regexList = [ |
| 57 | + { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments |
| 58 | + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings |
| 59 | + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings |
| 60 | + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords |
| 61 | + { regex: new RegExp(this.getKeywords(commands), 'gm'), css: 'functions' } // commands |
| 62 | + ]; |
| 63 | +} |
| 64 | + |
| 65 | +SyntaxHighlighter.brushes.Bash.prototype = new SyntaxHighlighter.Highlighter(); |
| 66 | +SyntaxHighlighter.brushes.Bash.aliases = ['bash', 'shell']; |
0 commit comments