plugins/geshi/geshi/bash.php
changeset 0 441963e5b07a
child 2 9e3258dfae15
equal deleted inserted replaced
-1:000000000000 0:441963e5b07a
       
     1 <?php
       
     2 /*************************************************************************************
       
     3  * bash.php
       
     4  * --------
       
     5  * Author: Andreas Gohr (andi@splitbrain.org)
       
     6  * Copyright: (c) 2004 Andreas Gohr, Nigel McNie (http://qbnz.com/highlighter)
       
     7  * Release Version: 1.0.7.20
       
     8  * Date Started: 2004/08/20
       
     9  *
       
    10  * BASH language file for GeSHi.
       
    11  *
       
    12  * CHANGES
       
    13  * -------
       
    14  * 2007/06/11 (1.0.7.20)
       
    15  *  -  Added a lot of keywords (BenBE / Jan G)
       
    16  * 2004/11/27 (1.0.2)
       
    17  *  -  Added support for multiple object splitters
       
    18  * 2004/10/27 (1.0.1)
       
    19  *   -  Added support for URLs
       
    20  * 2004/08/20 (1.0.0)
       
    21  *   -  First Release
       
    22  *
       
    23  * TODO (updated 2004/11/27)
       
    24  * -------------------------
       
    25  * * Get symbols working
       
    26  * * Highlight builtin vars
       
    27  *
       
    28  *************************************************************************************
       
    29  *
       
    30  *     This file is part of GeSHi.
       
    31  *
       
    32  *   GeSHi is free software; you can redistribute it and/or modify
       
    33  *   it under the terms of the GNU General Public License as published by
       
    34  *   the Free Software Foundation; either version 2 of the License, or
       
    35  *   (at your option) any later version.
       
    36  *
       
    37  *   GeSHi is distributed in the hope that it will be useful,
       
    38  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    39  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    40  *   GNU General Public License for more details.
       
    41  *
       
    42  *   You should have received a copy of the GNU General Public License
       
    43  *   along with GeSHi; if not, write to the Free Software
       
    44  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
       
    45  *
       
    46  ************************************************************************************/
       
    47 
       
    48 $language_data = array (
       
    49     'LANG_NAME' => 'Bash',
       
    50     // Bash DOES have single line comments with # markers. But bash also has
       
    51     // the  $# variable, so comments need special handling (see sf.net
       
    52     // 1564839)
       
    53 	'COMMENT_SINGLE' => array(),
       
    54 	'COMMENT_MULTI' => array(),
       
    55 	'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
       
    56 	'QUOTEMARKS' => array("'", '"'),
       
    57 	'ESCAPE_CHAR' => '\\',
       
    58 	'KEYWORDS' => array(
       
    59 		1 => array(
       
    60 			'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function',
       
    61 			'if', 'in', 'select', 'set', 'then', 'until', 'while', 'time'
       
    62 			),
       
    63 		2 => array(
       
    64 			'aclocal', 'aconnect', 'aplay', 'apm', 'apmsleep', 'apropos',
       
    65 			'ar', 'arch', 'arecord', 'as', 'as86', 'autoconf', 'autoheader',
       
    66 			'automake', 'awk',
       
    67 			'basename', 'bc', 'bison', 'bunzip2', 'bzip2', 'bzcat',
       
    68 			'bzcmp', 'bzdiff', 'bzegrep', 'bzegrep', 'bzfgrep', 'bzgrep',
       
    69 			'bzip2', 'bzip2recover', 'bzless', 'bzmore',
       
    70 			'c++', 'cal', 'cat', 'chattr', 'cc', 'cdda2wav', 'cdparanoia',
       
    71 			'cdrdao', 'cd-read', 'cdrecord', 'chfn', 'chgrp', 'chmod',
       
    72 			'chown', 'chroot', 'chsh', 'chvt', 'clear', 'cmp', 'comm', 'co',
       
    73 			'col', 'cp', 'cpio', 'cpp', 'cut',
       
    74 			'date', 'dd', 'dc', 'dcop', 'deallocvt', 'df', 'diff', 'diff3', 'dir',
       
    75 			'dircolors', 'directomatic', 'dirname', 'dmesg',
       
    76 			'dnsdomainname', 'domainname', 'du', 'dumpkeys',
       
    77 			'ed', 'egrep', 'env', 'expr',
       
    78 			'false', 'fbset', 'fgconsole','fgrep', 'find', 'file', 'flex', 'flex++',
       
    79 			'fmt', 'free', 'ftp', 'funzip', 'fuser',
       
    80 			'g++', 'gawk', 'gc','gcc', 'gdb', 'getent', 'getkeycodes',
       
    81 			'getopt', 'gettext', 'gettextize', 'gimp', 'gimp-remote',
       
    82 			'gimptool', 'gmake', 'gocr', 'grep', 'groups', 'gs', 'gunzip',
       
    83 			'gzexe', 'gzip',
       
    84 			'head', 'hexdump', 'hostname',
       
    85 			'id', 'igawk', 'install',
       
    86 			'join',
       
    87 			'kbd_mode','kbdrate', 'kdialog', 'kfile', 'kill', 'killall',
       
    88 			'last', 'lastb', 'ld', 'ld86', 'ldd', 'less', 'lex', 'link', 'ln', 'loadkeys',
       
    89 			'loadunimap', 'locate', 'lockfile', 'login', 'logname',
       
    90 			'lp', 'lpr', 'ls', 'lsattr', 'lsmod', 'lsmod.old', 'lynx',
       
    91 			'm4', 'make', 'man', 'mapscrn', 'mesg', 'mkdir', 'mkfifo', 
       
    92 			'mknod', 'mktemp', 'more', 'mount', 'msgfmt', 'mv',
       
    93 			'namei', 'nano', 'nasm', 'nawk', 'netstat', 'nice',
       
    94 			'nisdomainname', 'nl', 'nm', 'nm86', 'nmap', 'nohup', 'nop',
       
    95 			'od', 'openvt',
       
    96 			'passwd', 'patch', 'pcregrep', 'pcretest', 'perl', 'perror',
       
    97 			'pgawk', 'pidof', 'ping', 'pr', 'procmail', 'prune', 'ps', 'pstree',
       
    98 			'ps2ascii', 'ps2epsi', 'ps2frag', 'ps2pdf', 'ps2ps', 'psbook',
       
    99 			'psmerge', 'psnup', 'psresize', 'psselect', 'pstops',
       
   100 			'rbash', 'rcs', 'read', 'readlink', 'red', 'resizecons', 'rev', 'rm',
       
   101 			'rmdir', 'run-parts',
       
   102 			'sash', 'sed', 'setfont', 'setkeycodes', 'setleds',
       
   103 			'setmetamode', 'setserial', 'scp', 'seq', 'setterm', 'sh',
       
   104 			'showkey', 'shred', 'size', 'size86', 'skill', 'sleep', 'slogin',
       
   105 			'snice', 'sort', 'sox', 'split', 'ssed', 'ssh', 'ssh-add',
       
   106 			'ssh-agent', 'ssh-keygen', 'ssh-keyscan', 'stat', 'strings',
       
   107 			'strip', 'stty', 'su', 'sudo', 'suidperl', 'sum', 'sync',
       
   108 			'tac', 'tail', 'tar', 'tee', 'tempfile', 'touch', 'tr', 'true',
       
   109 			'umount', 'uname', 'unicode_start', 'unicode_stop', 'uniq',
       
   110 			'unlink', 'unzip', 'updatedb', 'updmap', 'uptime', 'users',
       
   111 			'utmpdump', 'uuidgen',
       
   112 			'vdir', 'vmstat',
       
   113 			'w', 'wall', 'wc', 'wget', 'whatis', 'whereis', 'which', 'who',
       
   114 			'whoami', 'write',
       
   115 			'xargs', 'xhost', 'xmodmap', 'xset',
       
   116 			'yacc', 'yes', 'ypdomainname',
       
   117 			'zcat', 'zcmp', 'zdiff', 'zegrep', 'zfgrep', 'zforce', 'zgrep',
       
   118 			'zip', 'zless', 'zmore', 'znew', 'zsh', ' zsoelim'
       
   119 			),
       
   120 		3 => array(
       
   121 			'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command',
       
   122 			'compgen', 'complete', 'continue', 'declare', 'dirs', 'disown',
       
   123 			'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc',
       
   124 			'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let',
       
   125 			'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'readonly',
       
   126 			'return', 'shift', 'shopt', 'source', 'suspend', 'test', 'times',
       
   127 			'trap', 'type', 'typeset', 'ulimit', 'umask', 'unalias', 'unset',
       
   128 			'wait'
       
   129 			)
       
   130 		),
       
   131 	'SYMBOLS' => array(
       
   132 		'(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>', ';;'
       
   133 		),
       
   134 	'CASE_SENSITIVE' => array(
       
   135 		GESHI_COMMENTS => false,
       
   136 		1 => true,
       
   137 		2 => true,
       
   138 		3 => true
       
   139 		),
       
   140 	'STYLES' => array(
       
   141 		'KEYWORDS' => array(
       
   142 			1 => 'color: #000000; font-weight: bold;',
       
   143 			2 => 'color: #c20cb9; font-weight: bold;',
       
   144 			3 => 'color: #7a0874; font-weight: bold;'
       
   145 			),
       
   146 		'COMMENTS' => array(
       
   147 			1 => 'color: #808080; font-style: italic;'
       
   148 			),
       
   149 		'ESCAPE_CHAR' => array(
       
   150 			0 => 'color: #000099; font-weight: bold;'
       
   151 			),
       
   152 		'BRACKETS' => array(
       
   153 			0 => 'color: #7a0874; font-weight: bold;'
       
   154 			),
       
   155 		'STRINGS' => array(
       
   156 			0 => 'color: #ff0000;'
       
   157 			),
       
   158 		'NUMBERS' => array(
       
   159 			0 => 'color: #000000;'
       
   160 			),
       
   161 		'METHODS' => array(
       
   162 			),
       
   163 		'SYMBOLS' => array(
       
   164 			0 => 'color: #000000; font-weight: bold;'
       
   165 			),
       
   166 		'REGEXPS' => array(
       
   167 			0 => 'color: #007800;',
       
   168 			1 => 'color: #007800;',
       
   169 			2 => 'color: #007800;',
       
   170 			3 => 'color: #808080; font-style: italic;',
       
   171 			4 => 'color: #007800;'
       
   172 			),
       
   173 		'SCRIPT' => array(
       
   174 			)
       
   175 		),
       
   176 	'URLS' => array(
       
   177 		1 => '',
       
   178 		2 => '',
       
   179 		3 => ''
       
   180 	),
       
   181 	'OOLANG' => false,
       
   182 	'OBJECT_SPLITTERS' => array(
       
   183 		),
       
   184 	'REGEXPS' => array(
       
   185 		0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
       
   186 		1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
       
   187 		2 => "([a-zA-Z_][a-zA-Z0-9_]*)=",
       
   188 		3 => "(?<!\\$)#[^\n]*",
       
   189 		4 => "\\$#"
       
   190 		),
       
   191 	'STRICT_MODE_APPLIES' => GESHI_NEVER,
       
   192 	'SCRIPT_DELIMITERS' => array(
       
   193 		),
       
   194 	'HIGHLIGHT_STRICT_BLOCK' => array(
       
   195 		)
       
   196 );
       
   197 
       
   198 ?>