2 /*************************************************************************************
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.19
8 * Date Started: 2004/08/20
10 * BASH language file for GeSHi.
15 * - Added support for multiple object splitters
17 * - Added support for URLs
21 * TODO (updated 2004/11/27)
22 * -------------------------
23 * * Get symbols working
24 * * Highlight builtin vars
26 *************************************************************************************
28 * This file is part of GeSHi.
30 * GeSHi is free software; you can redistribute it and/or modify
31 * it under the terms of the GNU General Public License as published by
32 * the Free Software Foundation; either version 2 of the License, or
33 * (at your option) any later version.
35 * GeSHi is distributed in the hope that it will be useful,
36 * but WITHOUT ANY WARRANTY; without even the implied warranty of
37 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 * GNU General Public License for more details.
40 * You should have received a copy of the GNU General Public License
41 * along with GeSHi; if not, write to the Free Software
42 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
44 ************************************************************************************/
46 $language_data = array (
47 'LANG_NAME' => 'Bash',
48 // Bash DOES have single line comments with # markers. But bash also has
49 // the $# variable, so comments need special handling (see sf.net
51 'COMMENT_SINGLE' => array(),
52 'COMMENT_MULTI' => array(),
53 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE
,
54 'QUOTEMARKS' => array("'", '"'),
55 'ESCAPE_CHAR' => '\\',
58 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'function',
59 'if', 'in', 'select', 'then', 'until', 'while', 'time'
62 'source', 'alias', 'bg', 'bind', 'break', 'builtin', 'cd', 'command',
63 'compgen', 'complete', 'continue', 'declare', 'typeset', 'dirs',
64 'disown', 'echo', 'enable', 'eval', 'exec', 'exit', 'export', 'fc',
65 'fg', 'getopts', 'hash', 'help', 'history', 'jobs', 'kill', 'let',
66 'local', 'logout', 'popd', 'printf', 'pushd', 'pwd', 'read', 'readonly',
67 'return', 'set', 'shift', 'shopt', 'suspend', 'test', 'times', 'trap',
68 'type', 'ulimit', 'umask', 'unalias', 'unset', 'wait'
72 '(', ')', '[', ']', '!', '@', '%', '&', '*', '|', '/', '<', '>'
74 'CASE_SENSITIVE' => array(
75 GESHI_COMMENTS
=> false
,
81 1 => 'color: #b1b100;',
82 3 => 'color: #000066;'
85 1 => 'color: #808080; font-style: italic;',
87 'ESCAPE_CHAR' => array(
88 0 => 'color: #000099; font-weight: bold;'
91 0 => 'color: #66cc66;'
94 0 => 'color: #ff0000;'
97 0 => 'color: #cc66cc;'
102 0 => 'color: #66cc66;'
105 0 => 'color: #0000ff;',
106 1 => 'color: #0000ff;',
107 2 => 'color: #0000ff;',
108 3 => 'color: #808080; font-style: italic;',
109 4 => 'color: #0000ff;'
119 'OBJECT_SPLITTERS' => array(
122 0 => "\\$\\{[a-zA-Z_][a-zA-Z0-9_]*?\\}",
123 1 => "\\$[a-zA-Z_][a-zA-Z0-9_]*",
124 2 => "([a-zA-Z_][a-zA-Z0-9_]*)=",
125 3 => "(?<!\\$)#[^\n]*",
128 'STRICT_MODE_APPLIES' => GESHI_NEVER
,
129 'SCRIPT_DELIMITERS' => array(
131 'HIGHLIGHT_STRICT_BLOCK' => array(