Skip to content

Commit a390e98

Browse files
author
Lucien Grondin
authored
runtime(sh): add shDblParen to shLoopList for bash (#13445)
add shDblParen to shLoopList to correctly highlight arithmetic expressions for Bash and Ksh This should allow code such as: ```bash declare -i i j for i in foo bar do ((j = 1 << j)) done ``` Signed-off-by: Lucien Grondin <grondilu@yahoo.fr> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 171c50e commit a390e98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/syntax/sh.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLin
163163
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
164164
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
165165
if exists("b:is_kornshell") || exists("b:is_bash")
166-
syn cluster shLoopoList add=shForPP
166+
syn cluster shLoopList add=shForPP,shDblParen
167167
endif
168168
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
169169
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm

0 commit comments

Comments
 (0)