Mercurial > vim
annotate runtime/syntax/sh.vim @ 5686:0a9990bbd94a v7.4.189
updated for version 7.4.189
Problem: Compiler warning for unused argument.
Solution: Add UNUSED.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 23 Feb 2014 22:54:58 +0100 |
parents | 0d4e0cde36e1 |
children | 657ade71d395 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: shell (sh) Korn shell (ksh) bash (sh) | |
3920 | 3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> |
7 | 4 " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
5 " Last Change: Jul 02, 2013 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
6 " Version: 131 |
507 | 7 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax |
1668 | 8 " For options and settings, please use: :help ft-sh-syntax |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
9 " This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr) |
7 | 10 |
22 | 11 " For version 5.x: Clear all syntax items {{{1 |
7 | 12 " For version 6.x: Quit when a syntax file was already loaded |
13 if version < 600 | |
14 syntax clear | |
15 elseif exists("b:current_syntax") | |
16 finish | |
17 endif | |
18 | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
19 " AFAICT "." should be considered part of the iskeyword. Using iskeywords in |
3920 | 20 " syntax is dicey, so the following code permits the user to |
21 " g:sh_isk set to a string : specify iskeyword. | |
22 " g:sh_noisk exists : don't change iskeyword | |
23 " g:sh_noisk does not exist : (default) append "." to iskeyword | |
24 if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword | |
25 exe "setl isk=".g:sh_isk | |
26 elseif !exists("g:sh_noisk") " optionally prevent appending '.' to iskeyword | |
27 setl isk+=. | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
28 endif |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
29 |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
30 " trying to answer the question: which shell is /bin/sh, really? |
3920 | 31 " If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
32 if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
33 let s:shell = "" |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
34 if executable("/bin/sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
35 let s:shell = resolve("/bin/sh") |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
36 elseif executable("/usr/bin/sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
37 let s:shell = resolve("/usr/bin/sh") |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
38 endif |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
39 if s:shell =~ 'bash$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
40 let g:is_bash= 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
41 elseif s:shell =~ 'ksh$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
42 let g:is_kornshell = 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
43 elseif s:shell =~ 'dash$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
44 let g:is_posix = 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
45 endif |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
46 unlet s:shell |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
47 endif |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
48 |
22 | 49 " handling /bin/sh with is_kornshell/is_sh {{{1 |
7 | 50 " b:is_sh is set when "#! /bin/sh" is found; |
51 " However, it often is just a masquerade by bash (typically Linux) | |
52 " or kornshell (typically workstations with Posix "sh"). | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
53 " So, when the user sets "g:is_bash", "g:is_kornshell", |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
54 " or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell, |
7 | 55 " respectively. |
56 if !exists("b:is_kornshell") && !exists("b:is_bash") | |
828 | 57 if exists("g:is_posix") && !exists("g:is_kornshell") |
58 let g:is_kornshell= g:is_posix | |
59 endif | |
60 if exists("g:is_kornshell") | |
7 | 61 let b:is_kornshell= 1 |
62 if exists("b:is_sh") | |
63 unlet b:is_sh | |
64 endif | |
828 | 65 elseif exists("g:is_bash") |
7 | 66 let b:is_bash= 1 |
67 if exists("b:is_sh") | |
68 unlet b:is_sh | |
69 endif | |
70 else | |
71 let b:is_sh= 1 | |
72 endif | |
73 endif | |
74 | |
199 | 75 " set up default g:sh_fold_enabled {{{1 |
7 | 76 if !exists("g:sh_fold_enabled") |
77 let g:sh_fold_enabled= 0 | |
36 | 78 elseif g:sh_fold_enabled != 0 && !has("folding") |
79 let g:sh_fold_enabled= 0 | |
199 | 80 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" |
81 endif | |
1668 | 82 if !exists("s:sh_fold_functions") |
3920 | 83 let s:sh_fold_functions= and(g:sh_fold_enabled,1) |
1668 | 84 endif |
85 if !exists("s:sh_fold_heredoc") | |
3920 | 86 let s:sh_fold_heredoc = and(g:sh_fold_enabled,2) |
1668 | 87 endif |
88 if !exists("s:sh_fold_ifdofor") | |
3920 | 89 let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4) |
1668 | 90 endif |
199 | 91 if g:sh_fold_enabled && &fdm == "manual" |
3920 | 92 " Given that the user provided g:sh_fold_enabled |
93 " AND g:sh_fold_enabled is manual (usual default) | |
94 " implies a desire for syntax-based folding | |
95 setl fdm=syntax | |
7 | 96 endif |
97 | |
199 | 98 " sh syntax is case sensitive {{{1 |
7 | 99 syn case match |
100 | |
22 | 101 " Clusters: contains=@... clusters {{{1 |
7 | 102 "================================== |
2034 | 103 syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK |
1668 | 104 if exists("b:is_kornshell") |
105 syn cluster ErrorList add=shDTestError | |
106 endif | |
2497 | 107 syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement |
1668 | 108 syn cluster shArithList contains=@shArithParenList,shParenError |
2034 | 109 syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
110 syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq |
3281 | 111 "syn cluster shColonList contains=@shCaseList |
4229 | 112 syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion |
464 | 113 syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial |
3920 | 114 syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial |
482 | 115 syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS |
7 | 116 syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError |
3920 | 117 syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote |
2497 | 118 syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq |
119 | 119 syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
120 syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq |
1201 | 121 if exists("b:is_kornshell") || exists("b:is_bash") |
1668 | 122 syn cluster shFunctionList add=shRepeat |
1201 | 123 syn cluster shFunctionList add=shDblBrace,shDblParen |
124 endif | |
7 | 125 syn cluster shHereBeginList contains=@shCommandSubList |
126 syn cluster shHereList contains=shBeginHere,shHerePayload | |
127 syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
128 syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr |
3281 | 129 syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo |
130 syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
131 syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
132 syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq |
22 | 133 " Echo: {{{1 |
7 | 134 " ==== |
135 " This one is needed INSIDE a CommandSub, so that `echo bla` be correct | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
136 syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
137 syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment |
2034 | 138 syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' |
7 | 139 |
1668 | 140 " This must be after the strings, so that ... \" will be correct |
2497 | 141 syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq |
7 | 142 |
22 | 143 " Alias: {{{1 |
7 | 144 " ===== |
145 if exists("b:is_kornshell") || exists("b:is_bash") | |
146 syn match shStatement "\<alias\>" | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
147 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
148 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" |
7 | 149 endif |
150 | |
22 | 151 " Error Codes: {{{1 |
152 " ============ | |
3281 | 153 if !exists("g:sh_no_error") |
154 syn match shDoError "\<done\>" | |
155 syn match shIfError "\<fi\>" | |
156 syn match shInError "\<in\>" | |
157 syn match shCaseError ";;" | |
158 syn match shEsacError "\<esac\>" | |
159 syn match shCurlyError "}" | |
160 syn match shParenError ")" | |
161 syn match shOK '\.\(done\|fi\|in\|esac\)' | |
162 if exists("b:is_kornshell") | |
163 syn match shDTestError "]]" | |
164 endif | |
165 syn match shTestError "]" | |
7 | 166 endif |
167 | |
1668 | 168 " Options: {{{1 |
22 | 169 " ==================== |
3920 | 170 syn match shOption "\s\zs[-+][-_a-zA-Z0-9#]\+" |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
171 syn match shOption "\s\zs--[^ \t$`'"|);]\+" |
7 | 172 |
1201 | 173 " File Redirection Highlighted As Operators: {{{1 |
174 "=========================================== | |
175 syn match shRedir "\d\=>\(&[-0-9]\)\=" | |
176 syn match shRedir "\d\=>>-\=" | |
177 syn match shRedir "\d\=<\(&[-0-9]\)\=" | |
178 syn match shRedir "\d<<-\=" | |
179 | |
22 | 180 " Operators: {{{1 |
181 " ========== | |
1201 | 182 syn match shOperator "<<\|>>" contained |
1668 | 183 syn match shOperator "[!&;|]" contained |
184 syn match shOperator "\[[[^:]\|\]]" contained | |
7 | 185 syn match shOperator "!\==" skipwhite nextgroup=shPattern |
2497 | 186 syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref |
7 | 187 |
22 | 188 " Subshells: {{{1 |
189 " ========== | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
190 syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
191 syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial |
7 | 192 |
22 | 193 " Tests: {{{1 |
194 "======= | |
2152 | 195 syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial |
2034 | 196 syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 |
1121 | 197 syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" |
198 syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern | |
199 syn match shTestPattern contained '\w\+' | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
200 syn match shTestDoubleQuote contained '\%(\%(\\\\\)*\\\)\@<!"[^"]*"' |
1121 | 201 syn match shTestSingleQuote contained '\\.' |
202 syn match shTestSingleQuote contained "'[^']*'" | |
7 | 203 if exists("b:is_kornshell") || exists("b:is_bash") |
204 syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList | |
205 syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList | |
206 endif | |
207 | |
22 | 208 " Character Class In Range: {{{1 |
209 " ========================= | |
7 | 210 syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" |
211 | |
22 | 212 " Loops: do, if, while, until {{{1 |
213 " ====== | |
3920 | 214 if s:sh_fold_ifdofor |
820 | 215 syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList |
3281 | 216 syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList |
3920 | 217 syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn |
820 | 218 else |
219 syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList | |
3281 | 220 syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList |
3920 | 221 syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn |
222 syn match shForPP '\<for\>\ze\_s*((' | |
820 | 223 endif |
7 | 224 if exists("b:is_kornshell") || exists("b:is_bash") |
1668 | 225 syn cluster shCaseList add=shRepeat |
226 syn cluster shFunctionList add=shRepeat | |
227 syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
228 syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
229 syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList | |
7 | 230 else |
1668 | 231 syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList |
232 syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList | |
7 | 233 endif |
464 | 234 syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList |
235 syn match shComma contained "," | |
7 | 236 |
22 | 237 " Case: case...esac {{{1 |
7 | 238 " ==== |
1668 | 239 syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote |
7 | 240 syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar |
3920 | 241 if s:sh_fold_ifdofor |
2034 | 242 syn region shCase fold contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment |
820 | 243 syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList |
244 else | |
2034 | 245 syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment |
820 | 246 syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList |
247 endif | |
167 | 248 syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote |
249 if exists("b:is_bash") | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
250 syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained |
3281 | 251 elseif !exists("g:sh_no_error") |
167 | 252 syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
253 endif | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
254 syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
255 syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
7 | 256 syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained |
3920 | 257 if exists("b:is_bash") |
258 syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass | |
259 syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained | |
260 else | |
261 syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained | |
262 endif | |
22 | 263 " Misc: {{{1 |
264 "====== | |
7 | 265 syn match shWrapLineOperator "\\$" |
3920 | 266 syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
267 syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' |
7 | 268 |
22 | 269 " $() and $(()): {{{1 |
7 | 270 " $(..) is not supported by sh (Bourne shell). However, apparently |
271 " some systems (HP?) have as their /bin/sh a (link to) Korn shell | |
272 " (ie. Posix compliant shell). /bin/ksh should work for those | |
273 " systems too, however, so the following syntax will flag $(..) as | |
274 " an Error under /bin/sh. By consensus of vimdev'ers! | |
275 if exists("b:is_kornshell") || exists("b:is_bash") | |
276 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList | |
1668 | 277 syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList |
3445 | 278 syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList |
7 | 279 syn match shSkipInitWS contained "^\s\+" |
3281 | 280 elseif !exists("g:sh_no_error") |
167 | 281 syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList |
7 | 282 endif |
3920 | 283 syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList |
7 | 284 |
285 if exists("b:is_bash") | |
286 syn cluster shCommandSubList add=bashSpecialVariables,bashStatement | |
287 syn cluster shCaseList add=bashAdminStatement,bashStatement | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
288 syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID |
3920 | 289 syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch |
7 | 290 syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop |
3920 | 291 syn keyword bashStatement command compgen |
7 | 292 endif |
293 | |
294 if exists("b:is_kornshell") | |
295 syn cluster shCommandSubList add=kshSpecialVariables,kshStatement | |
296 syn cluster shCaseList add=kshStatement | |
297 syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL | |
3920 | 298 syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput |
299 syn keyword kshStatement command setgroups setsenv | |
7 | 300 endif |
301 | |
302 syn match shSource "^\.\s" | |
303 syn match shSource "\s\.\s" | |
2034 | 304 "syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList |
3281 | 305 "syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 |
306 syn match shColon '^\s*\zs:' | |
7 | 307 |
22 | 308 " String And Character Constants: {{{1 |
309 "================================ | |
1121 | 310 syn match shNumber "-\=\<\d\+\>#\=" |
311 syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained | |
167 | 312 if exists("b:is_bash") |
2034 | 313 syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained |
167 | 314 endif |
315 if exists("b:is_bash") | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
316 syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial |
2497 | 317 syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial |
3281 | 318 elseif !exists("g:sh_no_error") |
1121 | 319 syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial |
2497 | 320 syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial |
167 | 321 endif |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
322 syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
323 syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
324 "syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell |
1698 | 325 syn match shStringSpecial "[^[:print:] \t]" contained |
1201 | 326 syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]" |
3920 | 327 syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment |
328 syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment | |
2034 | 329 syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained |
7 | 330 |
22 | 331 " Comments: {{{1 |
332 "========== | |
2034 | 333 syn cluster shCommentGroup contains=shTodo,@Spell |
334 syn keyword shTodo contained COMBAK FIXME TODO XXX | |
335 syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup | |
336 syn match shComment "\s\zs#.*$" contains=@shCommentGroup | |
3920 | 337 syn match shComment contained "#.*$" contains=@shCommentGroup |
2034 | 338 syn match shQuickComment contained "#.*$" |
7 | 339 |
22 | 340 " Here Documents: {{{1 |
341 " ========================================= | |
7 | 342 if version < 600 |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
343 syn region shHereDoc matchgroup=shRedir01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
344 syn region shHereDoc matchgroup=shRedir02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
345 syn region shHereDoc matchgroup=shRedir03 start="<<\s*\**EOF\**" matchgroup=shRedir03 end="^EOF$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
346 syn region shHereDoc matchgroup=shRedir04 start="<<-\s*\**EOF\**" matchgroup=shRedir04 end="^\s*EOF$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
347 syn region shHereDoc matchgroup=shRedir05 start="<<\s*\**\.\**" matchgroup=shRedir05 end="^\.$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
348 syn region shHereDoc matchgroup=shRedir06 start="<<-\s*\**\.\**" matchgroup=shRedir06 end="^\s*\.$" contains=@shDblQuoteList |
7 | 349 |
3920 | 350 elseif s:sh_fold_heredoc |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
351 syn region shHereDoc matchgroup=shRedir07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shRedir07 end="^\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
352 syn region shHereDoc matchgroup=shRedir08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir08 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
353 syn region shHereDoc matchgroup=shRedir09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir09 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
354 syn region shHereDoc matchgroup=shRedir10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir10 end="^\s*\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
355 syn region shHereDoc matchgroup=shRedir11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir11 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
356 syn region shHereDoc matchgroup=shRedir12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir12 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
357 syn region shHereDoc matchgroup=shRedir13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir13 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
358 syn region shHereDoc matchgroup=shRedir14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir14 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
359 syn region shHereDoc matchgroup=shRedir15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir15 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
360 syn region shHereDoc matchgroup=shRedir16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir16 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
361 syn region shHereDoc matchgroup=shRedir17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir17 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
362 syn region shHereDoc matchgroup=shRedir18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir18 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
363 syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$" |
7 | 364 |
365 else | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
366 syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
367 syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
368 syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
369 syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
370 syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
371 syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
372 syn region shHereDoc matchgroup=shRedir26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir26 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
373 syn region shHereDoc matchgroup=shRedir27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir27 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
374 syn region shHereDoc matchgroup=shRedir28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir28 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
375 syn region shHereDoc matchgroup=shRedir29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir29 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
376 syn region shHereDoc matchgroup=shRedir30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir30 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
377 syn region shHereDoc matchgroup=shRedir31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir31 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
378 syn region shHereDoc matchgroup=shRedir32 start="<<\\\z([^ \t|]*\)" matchgroup=shRedir32 end="^\z1\s*$" |
7 | 379 endif |
380 | |
22 | 381 " Here Strings: {{{1 |
382 " ============= | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
383 " available for: bash; ksh (really should be ksh93 only) but not if its a posix |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
384 if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix")) |
3920 | 385 syn match shRedir "<<<" skipwhite nextgroup=shCmdParenRegion |
22 | 386 endif |
387 | |
388 " Identifiers: {{{1 | |
389 "============= | |
1668 | 390 syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained |
391 syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier | |
3920 | 392 syn match shSetIdentifier "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
393 syn region shAtExpr contained start="@(" end=")" contains=@shIdList |
7 | 394 if exists("b:is_bash") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
395 syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
396 syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList |
7 | 397 elseif exists("b:is_kornshell") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
398 syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
399 syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
7 | 400 else |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
401 syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
7 | 402 endif |
403 | |
22 | 404 " Functions: {{{1 |
1668 | 405 if !exists("g:is_posix") |
406 syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo | |
407 endif | |
408 | |
409 if exists("b:is_bash") | |
3920 | 410 if s:sh_fold_functions |
411 syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
1668 | 412 syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment |
413 else | |
414 syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList | |
415 syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
416 endif | |
7 | 417 else |
3920 | 418 if s:sh_fold_functions |
1668 | 419 syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment |
420 syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
421 else | |
422 syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList | |
423 syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
424 endif | |
7 | 425 endif |
426 | |
22 | 427 " Parameter Dereferencing: {{{1 |
428 " ======================== | |
3920 | 429 syn match shDerefSimple "\$\%(\k\+\|\d\)" |
7 | 430 syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray |
3281 | 431 if !exists("g:sh_no_error") |
432 syn match shDerefWordError "[^}$[]" contained | |
433 endif | |
7 | 434 syn match shDerefSimple "\$[-#*@!?]" |
435 syn match shDerefSimple "\$\$" | |
436 if exists("b:is_bash") || exists("b:is_kornshell") | |
437 syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList | |
1668 | 438 syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList |
7 | 439 endif |
440 | |
22 | 441 " bash: ${!prefix*} and ${#parameter}: {{{1 |
442 " ==================================== | |
7 | 443 if exists("b:is_bash") |
444 syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp | |
3920 | 445 syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList |
7 | 446 endif |
447 | |
448 syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError | |
449 syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp | |
3920 | 450 syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList |
7 | 451 |
22 | 452 " sh ksh bash : ${var[... ]...} array reference: {{{1 |
7 | 453 syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError |
454 | |
22 | 455 " Special ${parameter OPERATOR word} handling: {{{1 |
7 | 456 " sh ksh bash : ${parameter:-word} word is default value |
457 " sh ksh bash : ${parameter:=word} assign word as default value | |
458 " sh ksh bash : ${parameter:?word} display word if parameter is null | |
459 " sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing | |
460 " ksh bash : ${parameter#pattern} remove small left pattern | |
461 " ksh bash : ${parameter##pattern} remove large left pattern | |
462 " ksh bash : ${parameter%pattern} remove small right pattern | |
463 " ksh bash : ${parameter%%pattern} remove large right pattern | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
464 " bash : ${parameter^pattern} Case modification |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
465 " bash : ${parameter^^pattern} Case modification |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
466 " bash : ${parameter,pattern} Case modification |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
467 " bash : ${parameter,,pattern} Case modification |
7 | 468 syn cluster shDerefPatternList contains=shDerefPattern,shDerefString |
3281 | 469 if !exists("g:sh_no_error") |
470 syn match shDerefOpError contained ":[[:punct:]]" | |
471 endif | |
7 | 472 syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList |
473 syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList | |
474 if exists("b:is_bash") || exists("b:is_kornshell") | |
475 syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList | |
476 syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList | |
482 | 477 syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern |
7 | 478 syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern |
482 | 479 syn match shDerefEscape contained '\%(\\\\\)*\\.' |
7 | 480 endif |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
481 if exists("b:is_bash") |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
482 syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
483 endif |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
484 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial |
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
485 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial |
1668 | 486 syn match shDerefString contained "\\["']" nextgroup=shDerefPattern |
7 | 487 |
488 if exists("b:is_bash") | |
482 | 489 " bash : ${parameter:offset} |
490 " bash : ${parameter:offset:length} | |
7 | 491 syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL |
482 | 492 syn match shDerefPOL contained ":[^}]\+" contains=@shCommandSubList |
493 | |
494 " bash : ${parameter//pattern/string} | |
495 " bash : ${parameter//pattern} | |
496 syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft | |
3920 | 497 syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList |
498 syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList | |
7 | 499 endif |
500 | |
1668 | 501 " Arithmetic Parenthesized Expressions: {{{1 |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
502 "syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
503 syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList |
1668 | 504 |
22 | 505 " Useful sh Keywords: {{{1 |
506 " =================== | |
7 | 507 syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait |
508 syn keyword shConditional contained elif else then | |
3281 | 509 if !exists("g:sh_no_error") |
510 syn keyword shCondError elif else then | |
511 endif | |
7 | 512 |
22 | 513 " Useful ksh Keywords: {{{1 |
514 " ==================== | |
7 | 515 if exists("b:is_kornshell") || exists("b:is_bash") |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
516 syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence |
1668 | 517 if exists("g:is_posix") |
518 syn keyword shStatement command | |
519 else | |
520 syn keyword shStatement time | |
521 endif | |
7 | 522 |
22 | 523 " Useful bash Keywords: {{{1 |
524 " ===================== | |
7 | 525 if exists("b:is_bash") |
526 syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source | |
527 else | |
528 syn keyword shStatement login newgrp | |
529 endif | |
530 endif | |
531 | |
22 | 532 " Synchronization: {{{1 |
533 " ================ | |
7 | 534 if !exists("sh_minlines") |
535 let sh_minlines = 200 | |
536 endif | |
537 if !exists("sh_maxlines") | |
538 let sh_maxlines = 2 * sh_minlines | |
539 endif | |
540 exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines | |
541 syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" | |
542 syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" | |
543 syn sync match shDoSync grouphere shDo "\<do\>" | |
544 syn sync match shDoSync groupthere shDo "\<done\>" | |
545 syn sync match shForSync grouphere shFor "\<for\>" | |
546 syn sync match shForSync groupthere shFor "\<in\>" | |
547 syn sync match shIfSync grouphere shIf "\<if\>" | |
548 syn sync match shIfSync groupthere shIf "\<fi\>" | |
549 syn sync match shUntilSync grouphere shRepeat "\<until\>" | |
550 syn sync match shWhileSync grouphere shRepeat "\<while\>" | |
551 | |
22 | 552 " Default Highlighting: {{{1 |
553 " ===================== | |
7 | 554 hi def link shArithRegion shShellVariables |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
555 hi def link shAtExpr shSetList |
167 | 556 hi def link shBeginHere shRedir |
7 | 557 hi def link shCaseBar shConditional |
558 hi def link shCaseCommandSub shCommandSub | |
559 hi def link shCaseDoubleQuote shDoubleQuote | |
167 | 560 hi def link shCaseIn shConditional |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
561 hi def link shQuote shOperator |
7 | 562 hi def link shCaseSingleQuote shSingleQuote |
563 hi def link shCaseStart shConditional | |
564 hi def link shCmdSubRegion shShellVariables | |
2034 | 565 hi def link shColon shComment |
167 | 566 hi def link shDerefOp shOperator |
567 hi def link shDerefPOL shDerefOp | |
482 | 568 hi def link shDerefPPS shDerefOp |
7 | 569 hi def link shDeref shShellVariables |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
570 hi def link shDerefDelim shOperator |
7 | 571 hi def link shDerefSimple shDeref |
572 hi def link shDerefSpecial shDeref | |
573 hi def link shDerefString shDoubleQuote | |
167 | 574 hi def link shDerefVar shDeref |
7 | 575 hi def link shDoubleQuote shString |
576 hi def link shEcho shString | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
577 hi def link shEchoDelim shOperator |
1668 | 578 hi def link shEchoQuote shString |
3920 | 579 hi def link shForPP shLoop |
7 | 580 hi def link shEmbeddedEcho shString |
1668 | 581 hi def link shEscape shCommandSub |
2497 | 582 hi def link shExDoubleQuote shDoubleQuote |
167 | 583 hi def link shExSingleQuote shSingleQuote |
1668 | 584 hi def link shFunction Function |
7 | 585 hi def link shHereDoc shString |
167 | 586 hi def link shHerePayload shHereDoc |
7 | 587 hi def link shLoop shStatement |
2034 | 588 hi def link shMoreSpecial shSpecial |
7 | 589 hi def link shOption shCommandSub |
590 hi def link shPattern shString | |
1668 | 591 hi def link shParen shArithmetic |
7 | 592 hi def link shPosnParm shShellVariables |
1668 | 593 hi def link shQuickComment shComment |
7 | 594 hi def link shRange shOperator |
595 hi def link shRedir shOperator | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
596 hi def link shSetListDelim shOperator |
1668 | 597 hi def link shSetOption shOption |
7 | 598 hi def link shSingleQuote shString |
599 hi def link shSource shOperator | |
600 hi def link shStringSpecial shSpecial | |
601 hi def link shSubShRegion shOperator | |
602 hi def link shTestOpr shConditional | |
1121 | 603 hi def link shTestPattern shString |
604 hi def link shTestDoubleQuote shString | |
605 hi def link shTestSingleQuote shString | |
7 | 606 hi def link shVariable shSetList |
607 hi def link shWrapLineOperator shOperator | |
608 | |
609 if exists("b:is_bash") | |
610 hi def link bashAdminStatement shStatement | |
611 hi def link bashSpecialVariables shShellVariables | |
612 hi def link bashStatement shStatement | |
199 | 613 hi def link shFunctionParen Delimiter |
614 hi def link shFunctionDelim Delimiter | |
3920 | 615 hi def link shCharClass shSpecial |
7 | 616 endif |
617 if exists("b:is_kornshell") | |
618 hi def link kshSpecialVariables shShellVariables | |
619 hi def link kshStatement shStatement | |
199 | 620 hi def link shFunctionParen Delimiter |
7 | 621 endif |
622 | |
3281 | 623 if !exists("g:sh_no_error") |
624 hi def link shCaseError Error | |
625 hi def link shCondError Error | |
626 hi def link shCurlyError Error | |
627 hi def link shDerefError Error | |
628 hi def link shDerefOpError Error | |
629 hi def link shDerefWordError Error | |
630 hi def link shDoError Error | |
631 hi def link shEsacError Error | |
632 hi def link shIfError Error | |
633 hi def link shInError Error | |
634 hi def link shParenError Error | |
635 hi def link shTestError Error | |
636 if exists("b:is_kornshell") | |
637 hi def link shDTestError Error | |
638 endif | |
7 | 639 endif |
640 | |
641 hi def link shArithmetic Special | |
642 hi def link shCharClass Identifier | |
643 hi def link shSnglCase Statement | |
644 hi def link shCommandSub Special | |
645 hi def link shComment Comment | |
646 hi def link shConditional Conditional | |
1121 | 647 hi def link shCtrlSeq Special |
7 | 648 hi def link shExprRegion Delimiter |
199 | 649 hi def link shFunctionKey Function |
7 | 650 hi def link shFunctionName Function |
651 hi def link shNumber Number | |
652 hi def link shOperator Operator | |
653 hi def link shRepeat Repeat | |
654 hi def link shSet Statement | |
655 hi def link shSetList Identifier | |
656 hi def link shShellVariables PreProc | |
657 hi def link shSpecial Special | |
658 hi def link shStatement Statement | |
659 hi def link shString String | |
660 hi def link shTodo Todo | |
661 hi def link shAlias Identifier | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
662 hi def link shRedir01 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
663 hi def link shRedir02 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
664 hi def link shRedir03 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
665 hi def link shRedir04 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
666 hi def link shRedir05 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
667 hi def link shRedir06 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
668 hi def link shRedir07 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
669 hi def link shRedir08 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
670 hi def link shRedir09 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
671 hi def link shRedir10 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
672 hi def link shRedir11 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
673 hi def link shRedir12 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
674 hi def link shRedir13 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
675 hi def link shRedir14 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
676 hi def link shRedir15 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
677 hi def link shRedir16 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
678 hi def link shRedir17 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
679 hi def link shRedir18 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
680 hi def link shRedir19 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
681 hi def link shRedir20 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
682 hi def link shRedir21 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
683 hi def link shRedir22 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
684 hi def link shRedir23 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
685 hi def link shRedir24 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
686 hi def link shRedir25 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
687 hi def link shRedir26 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
688 hi def link shRedir27 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
689 hi def link shRedir28 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
690 hi def link shRedir29 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
691 hi def link shRedir30 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
692 hi def link shRedir31 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
693 hi def link shRedir32 shRedir |
7 | 694 |
22 | 695 " Set Current Syntax: {{{1 |
696 " =================== | |
7 | 697 if exists("b:is_bash") |
698 let b:current_syntax = "bash" | |
699 elseif exists("b:is_kornshell") | |
700 let b:current_syntax = "ksh" | |
701 else | |
702 let b:current_syntax = "sh" | |
703 endif | |
704 | |
22 | 705 " vim: ts=16 fdm=marker |