22" Language: Zsh shell script
33" Maintainer: Christian Brabandt <[email protected] >44" Previous Maintainer: Nikolai Weibull <[email protected] >5- " Latest Revision: 2022-07-26
5+ " Latest Revision: 2024 Jan 04
66" License: Vim (see :h license)
77" Repository: https://github.com/chrisbra/vim-zsh
88
@@ -48,8 +48,9 @@ syn match zshPOSIXQuoted '\\u[0-9a-fA-F]\{1,4}'
4848syn match zshPOSIXQuoted ' \\ U[1-9a-fA-F]\{ 1,8}'
4949
5050syn region zshString matchgroup =zshStringDelimiter start =+ "+ end =+ "+
51- \ contains= zshQuoted,@z shDerefs,@z shSubstQuoted fold
51+ \ contains= @S pell, zshQuoted,@z shDerefs,@z shSubstQuoted fold
5252syn region zshString matchgroup =zshStringDelimiter start =+ '+ end =+ '+ fold
53+ \ contains= @S pell
5354syn region zshPOSIXString matchgroup =zshStringDelimiter start =+ \$ '+
5455 \ skip = + \\ [\\ ' ]+ end=+' + contains= zshPOSIXQuoted,zshQuoted
5556syn match zshJobSpec ' %\(\d\+\| ?\=\w\+\| [%+-]\) '
@@ -68,7 +69,7 @@ syn keyword zshConditional if then elif else fi esac select
6869
6970syn keyword zshCase case nextgroup =zshCaseWord skipwhite
7071syn match zshCaseWord / \S\+ / nextgroup =zshCaseIn skipwhite contained transparent
71- syn keyword zshCaseIn in nextgroup =zshCasePattern skipwhite skipnl contained
72+ syn keyword zshCaseIn in nextgroup =zshComment, zshCasePattern skipwhite skipnl contained
7273syn match zshCasePattern / \S [^)]*)/ contained
7374
7475syn keyword zshRepeat while until repeat
@@ -94,22 +95,24 @@ syn match zshRedir '|\@1<!|&\=|\@!'
9495
9596syn region zshHereDoc matchgroup =zshRedir
9697 \ start = ' <\@<!<<\s*\z([^<]\S*\)'
97- \ end = ' ^\z1\> '
98- \ contains= @z shSubst,@z shDerefs,zshQuoted,zshPOSIXString
98+ \ end = ' ^\z1$ '
99+ \ contains= @S pell, @ z shSubst,@z shDerefs,zshQuoted,zshPOSIXString
99100syn region zshHereDoc matchgroup =zshRedir
100101 \ start = ' <\@<!<<\s*\\\z(\S\+\)'
101- \ end = ' ^\z1\> '
102- \ contains= @z shSubst, @z shDerefs,zshQuoted,zshPOSIXString
102+ \ end = ' ^\z1$ '
103+ \ contains= @S pell
103104syn region zshHereDoc matchgroup =zshRedir
104105 \ start = ' <\@<!<<-\s*\\\=\z(\S\+\)'
105- \ end = ' ^\s *\z1\> '
106- \ contains= @z shSubst, @z shDerefs,zshQuoted,zshPOSIXString
106+ \ end = ' ^\t *\z1$ '
107+ \ contains= @S pell
107108syn region zshHereDoc matchgroup =zshRedir
108109 \ start = + <\@ <! <<\s * \( [" ']\)\z(\S\+\)\1+
109- \ end = ' ^\z1\>'
110+ \ end = ' ^\z1$'
111+ \ contains= @S pell
110112syn region zshHereDoc matchgroup =zshRedir
111113 \ start = + <\@ <! <<- \s * \( [" ']\)\z(\S\+\)\1+
112- \ end = ' ^\s*\z1\>'
114+ \ end = ' ^\t*\z1$'
115+ \ contains= @S pell
113116
114117syn match zshVariable ' \<\h\w *' contained
115118
0 commit comments