summaryrefslogtreecommitdiffstats
path: root/runtime/syntax
diff options
context:
space:
mode:
authorLucien Grondin <grondilu@yahoo.fr>2023-11-04 09:41:37 +0100
committerGitHub <noreply@github.com>2023-11-04 09:41:37 +0100
commitce3b0136c6d9d09af41969d3dc9634f115505a32 (patch)
tree62e7cd61a4b44e14f4779e47b0b1e9585d64c96b /runtime/syntax
parent2f54c13292af053ec00c18e5fded87b1bc602822 (diff)
runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash (#13480)
Add shDerefOffset to shDerefVarArray. Example code: ```bash declare -a a=({a..z}) echo "${a[@]:1:3}" ``` Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/sh.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 0fb10f0e51..e2b1947197 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -531,7 +531,7 @@ if exists("b:is_kornshell") || exists("b:is_posix")
endif
" sh ksh bash : ${var[... ]...} array reference: {{{1
-syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
+syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError,shDerefOffset
" Special ${parameter OPERATOR word} handling: {{{1
" sh ksh bash : ${parameter:-word} word is default value