ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HFile_bash.php
Go to the documentation of this file.
1<?php
2$BEAUT_PATH = realpath(".") . "/Services/COPage/syntax_highlight/php";
3if (!isset($BEAUT_PATH)) {
4 return;
5}
6require_once("$BEAUT_PATH/Beautifier/HFile.php");
7 class HFile_bash extends HFile
8 {
9 public function HFile_bash()
10 {
11 $this->HFile();
12 /*************************************/
13 // Beautifier Highlighting Configuration File
14 // Bash
15 /*************************************/
16 // Flags
17
18 $this->nocase = "0";
19 $this->notrim = "0";
20 $this->perl = "0";
21
22 // Colours
23
24 $this->colours = array("blue", "purple", "gray", "brown", "blue");
25 $this->quotecolour = "blue";
26 $this->blockcommentcolour = "green";
27 $this->linecommentcolour = "green";
28
29 // Indent Strings
30
31 $this->indent = array("{(");
32 $this->unindent = array("})");
33
34 // String characters and delimiters
35
36 $this->stringchars = array("'");
37 $this->delimiters = array("~", "!", "@", "$", "%", "^", "*", "(", ")", "+", "=", "/", "\\", "[", "]", "{", "}", ":", ";", "\"", "<", ">", "'", "�", "`", " ", ",", " ", ".", "?");
38 $this->escchar = "";
39
40 // Comment settings
41
42 $this->linecommenton = array("#");
43 $this->blockcommenton = array("");
44 $this->blockcommentoff = array("");
45
46 // Keywords (keyword mapping to colour number)
47
48 $this->keywords = array(
49 "'" => "1",
50 "{" => "1",
51 "}" => "1",
52 "&&" => "1",
53 "||" => "1",
54 "$" => "1",
55 "alias" => "1",
56 "break" => "1",
57 "case" => "1",
58 "continue" => "1",
59 "do" => "1",
60 "done" => "1",
61 "elif" => "1",
62 "else" => "1",
63 "esac" => "1",
64 "exit" => "1",
65 "export" => "1",
66 "fi" => "1",
67 "for" => "1",
68 "if" => "1",
69 "in" => "1",
70 "return" => "1",
71 "set" => "1",
72 "then" => "1",
73 "unalias" => "1",
74 "unset" => "1",
75 "while" => "1",
76 "halt" => "2",
77 "ifconfig" => "2",
78 "init" => "2",
79 "initlog" => "2",
80 "insmod" => "2",
81 "linuxconf" => "2",
82 "lsmod" => "2",
83 "modprobe" => "2",
84 "reboot" => "2",
85 "rmmod" => "2",
86 "route" => "2",
87 "shutdown" => "2",
88 "traceroute" => "2",
89 "]" => "3",
90 "[" => "3",
91 "awk" => "3",
92 "basename" => "3",
93 "cat" => "3",
94 "cp" => "3",
95 "echo" => "3",
96 "egrep" => "3",
97 "fgrep" => "3",
98 "gawk" => "3",
99 "grep" => "3",
100 "gzip" => "3",
101 "kill" => "3",
102 "killall" => "3",
103 "less" => "3",
104 "md" => "3",
105 "mkdir" => "3",
106 "mv" => "3",
107 "nice" => "3",
108 "pidof" => "3",
109 "ps" => "3",
110 "rd" => "3",
111 "read" => "3",
112 "rm" => "3",
113 "rmdir" => "3",
114 "sed" => "3",
115 "sleep" => "3",
116 "test" => "3",
117 "touch" => "3",
118 "ulimit" => "3",
119 "uname" => "3",
120 "usleep" => "3",
121 "zcat" => "3",
122 "zless" => "3",
123 "`" => "4",
124 "-a" => "4",
125 "-b" => "4",
126 "-c" => "4",
127 "-d" => "4",
128 "-e" => "4",
129 "-f" => "4",
130 "-g" => "4",
131 "-h" => "4",
132 "-i" => "4",
133 "-j" => "4",
134 "-k" => "4",
135 "-l" => "4",
136 "-m" => "4",
137 "-n" => "4",
138 "-o" => "4",
139 "-p" => "4",
140 "-q" => "4",
141 "-r" => "4",
142 "-s" => "4",
143 "-t" => "4",
144 "-u" => "4",
145 "-v" => "4",
146 "-w" => "4",
147 "-x" => "4",
148 "-z" => "4",
149 "-eq" => "5",
150 "-ge" => "5",
151 "-gt" => "5",
152 "-le" => "5",
153 "-lt" => "5",
154 "=" => "5",
155 "!=" => "5");
156
157 // Special extensions
158
159 // Each category can specify a PHP function that returns an altered
160 // version of the keyword.
161
162
163
164 $this->linkscripts = array(
165 "1" => "donothing",
166 "2" => "donothing",
167 "3" => "donothing",
168 "4" => "donothing",
169 "5" => "donothing");
170 }
171
172
173 public function donothing($keywordin)
174 {
175 return $keywordin;
176 }
177 }
$BEAUT_PATH
Definition: HFile_bash.php:2
An exception for terminatinating execution or to throw for unit testing.
donothing($keywordin)
Definition: HFile_bash.php:173