diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-11-04 11:39:42 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-11-04 12:55:54 +0100 |
commit | d3e9cbedc700a5ae9f64fdced07cdddbb4ef13d1 (patch) | |
tree | 41d8d57a8fde0b42dba41fe341b9052a852a9b9e | |
parent | e960fa2412948bfc8f059bff9ddb5397d7ee35d7 (diff) | |
download | rneovim-d3e9cbedc700a5ae9f64fdced07cdddbb4ef13d1.tar.gz rneovim-d3e9cbedc700a5ae9f64fdced07cdddbb4ef13d1.tar.bz2 rneovim-d3e9cbedc700a5ae9f64fdced07cdddbb4ef13d1.zip |
vim-patch:ce3b0136c6d9
runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash (vim/vim#13480)
Add shDerefOffset to shDerefVarArray.
Example code:
```bash
declare -a a=({a..z})
echo "${a[@]:1:3}"
```
https://github.com/vim/vim/commit/ce3b0136c6d9d09af41969d3dc9634f115505a32
Co-authored-by: Lucien Grondin <grondilu@yahoo.fr>
-rw-r--r-- | runtime/syntax/sh.vim | 2 |
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 |