|
2 | 2 | " Language: shell (sh) Korn shell (ksh) bash (sh)
|
3 | 3 | " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
4 | 4 | " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
5 |
| -" Last Change: Dec 20, 2022 |
6 |
| -" Version: 205 |
| 5 | +" Last Change: Nov 25, 2022 |
| 6 | +" Version: 204 |
7 | 7 | " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
8 | 8 | " For options and settings, please use: :help ft-sh-syntax
|
9 | 9 | " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
|
@@ -190,10 +190,8 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski
|
190 | 190 | " =====
|
191 | 191 | if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
|
192 | 192 | syn match shStatement "\<alias\>"
|
193 |
| - syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*\)\@=" skip="\\$" end="\>\|`" |
194 |
| - syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*=\)\@=" skip="\\$" end="=" |
195 |
| -" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" |
196 |
| -" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" |
| 193 | + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" |
| 194 | + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" |
197 | 195 |
|
198 | 196 | " Touch: {{{1
|
199 | 197 | " =====
|
@@ -335,7 +333,7 @@ syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' nextgroup=shComment
|
335 | 333 | " systems too, however, so the following syntax will flag $(..) as
|
336 | 334 | " an Error under /bin/sh. By consensus of vimdev'ers!
|
337 | 335 | if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
|
338 |
| - syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]\|$" skip='\\\\\|\\.' end=")" contains=@shCommandSubList |
| 336 | + syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList |
339 | 337 | syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList
|
340 | 338 | syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList
|
341 | 339 | syn match shSkipInitWS contained "^\s\+"
|
@@ -485,9 +483,7 @@ endif
|
485 | 483 |
|
486 | 484 | " Parameter Dereferencing: {{{1
|
487 | 485 | " ========================
|
488 |
| -" Note: sh04 failure with following line |
489 |
| -"if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")) |
490 |
| -if !exists("g:sh_no_error") |
| 486 | +if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")) |
491 | 487 | syn match shDerefWordError "[^}$[~]" contained
|
492 | 488 | endif
|
493 | 489 | syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList
|
|
0 commit comments