Skip to content

Commit 00889b1

Browse files
committed
Revert local sh.vim downgrade change as bug was fixed in upstream
See #1358 which performed the downgrade and rationale. This should also fix build breaking in CI.
1 parent 6f987a4 commit 00889b1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

runtime/syntax/sh.vim

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski
190190
" =====
191191
if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
192192
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="="
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="="
195197

196198
" Touch: {{{1
197199
" =====
@@ -483,7 +485,9 @@ endif
483485

484486
" Parameter Dereferencing: {{{1
485487
" ========================
486-
if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix"))
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")
487491
syn match shDerefWordError "[^}$[~]" contained
488492
endif
489493
syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList

0 commit comments

Comments
 (0)