runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash 
(#13480)

Commit: 
https://github.com/vim/vim/commit/ce3b0136c6d9d09af41969d3dc9634f115505a32
Author: Lucien Grondin <[email protected]>
Date:   Sat Nov 4 09:41:37 2023 +0100

    runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for 
bash (https://github.com/vim/vim/issues/13480)
    
    Add shDerefOffset to shDerefVarArray.
    
    Example code:
    
    ```bash
    declare -a a=({a..z})
    
    echo "${a[@]:1:3}"
    ```
    
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 0fb10f0e5..e2b194719 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

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qzCHC-002Myv-UR%40256bit.org.

Raspunde prin e-mail lui