runtime(sh): Update syntax file, command substitution opening paren at EOL

Commit: 
https://github.com/vim/vim/commit/6099db9a60d1c047bf9c8feee3e1689c4e653250
Author: Doug Kearns <dougkea...@gmail.com>
Date:   Thu Apr 3 21:13:39 2025 +0200

    runtime(sh): Update syntax file, command substitution opening paren at EOL
    
    Allow the opening parenthesis of a command substitution to appear at
    EOL.
    
    This fixes the issue raised in
    https://github.com/vim/vim/issues/17026#issuecomment-2774112284.
    
    closes: #17044
    
    Signed-off-by: Doug Kearns <dougkea...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index 37d1c0a83..298198274 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -8,6 +8,7 @@
 "              2025 Jan 06 add $PS0 to bashSpecialVariables (#16394)
 "              2025 Jan 18 add bash coproc, remove duplicate syn keywords 
(#16467)
 "              2025 Mar 21 update shell capability detection (#16939)
+"              2025 Apr 03 command substitution opening paren at EOL (#17026)
 " Version:             208
 " Former URL:          http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
 " For options and settings, please use:      :help ft-sh-syntax
@@ -389,7 +390,7 @@ syn match   shEscape        contained       
'\%(^\)\@!\%(\\\)*\.'   nextgroup=shComment
 " systems too, however, so the following syntax will flag $(..) as
 " an Error under /bin/sh.  By consensus of vimdev'ers!
 if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix")
- syn region shCommandSub matchgroup=shCmdSubRegion start="\$(\ze[^(]"  
skip='\\\|\.' end=")"  contains=@shCommandSubList
+ syn region shCommandSub matchgroup=shCmdSubRegion start="\$((\@!"  
skip='\\\|\.' end=")"  contains=@shCommandSubList
  if exists("b:is_kornshell")
   syn region shSubshare matchgroup=shCmdSubRegion start="\${\ze[       
<]"  skip='\\\|\.' end="\zs[    
;]}"  contains=@shCommandSubList
   syn region shValsub matchgroup=shCmdSubRegion start="\${|"  skip='\\\|\.' 
end="}"  contains=@shCommandSubList
diff --git a/runtime/syntax/testdir/dumps/sh_13_00.dump 
b/runtime/syntax/testdir/dumps/sh_13_00.dump
new file mode 100644
index 000000000..7fe0991d4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/sh_13_00.dump
@@ -0,0 +1,20 @@
+>#+0#0000e05#ffffff0| |I|s@1|u|e| |#|1|7|0|2|6| |(|b|a|s|h| 
|h|i|g|h|l|i|g|h|t|i|n|g| |r|e|q|u|i|r|e|s| |s|p|a|c|e| |a|f|t|e|r| |$|(|)@1| 
+0#0000000&@15
+|#+0#0000e05&| 
|h|t@1|p|s|:|/@1|g|i|t|h|u|b|.|c|o|m|/|v|i|m|/|v|i|m|/|i|s@1|u|e|s|/|1|7|0|2|6|#|i|s@1|u|e|c|o|m@1|e|n|t|-|2|7@1|4|1@1|2@1|8|4|
 +0#0000000&@9
+@75
+|_|c|o|m|p|_|c|o|m|p|g|e|n|_|s|p|l|i|t| |-+0#e000e06&|l| 
+0#0000000&|-+0#e000e06&@1| +0#0000000&|"+0#af5f00255&|$+0#e000e06&|(| 
+0#0000000&@45
+| +0#e000e06&@3|t|m|u|x| |l|i|s|t|-|c|o|m@1|a|n|d|s| |-|F| 
|"+0#af5f00255&|#+0#e000002&|{|c|o|m@1|a|n|d|_|l|i|s|t|_|n|a|m|e|}|"+0#af5f00255&|
 +0#0000000&@26
+| +0#e000e06&@3|t|m|u|x| |l|i|s|t|-|c|o|m@1|a|n|d|s| |-|F| 
|"+0#af5f00255&|#+0#e000002&|{|c|o|m@1|a|n|d|_|l|i|s|t|_|a|l|i|a|s|}|"+0#af5f00255&|
 +0#0000000&@25
+|)+0#e000e06&|"+0#af5f00255&| +0#0000000&@72
+@75
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|i+0#0000000&|s|_|b|a|s|h|:| |1|,| @45|1|,|1| @10|A|l@1| 
diff --git a/runtime/syntax/testdir/input/sh_13.sh 
b/runtime/syntax/testdir/input/sh_13.sh
new file mode 100644
index 000000000..a81c0a454
--- /dev/null
+++ b/runtime/syntax/testdir/input/sh_13.sh
@@ -0,0 +1,8 @@
+# Issue #17026 (bash highlighting requires space after $())
+# https://github.com/vim/vim/issues/17026#issuecomment-2774112284
+
+_comp_compgen_split -l -- "$(
+    tmux list-commands -F "#{command_list_name}"
+    tmux list-commands -F "#{command_list_alias}"
+)"
+

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1u0QGK-00G3B1-GI%40256bit.org.

Raspunde prin e-mail lui