commit 074ca976decff1d9b49907fb2322f6493089d0f2
parent d423dd8b8ba7e590a0a5d24ff5dc4a98dda08e2f
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 16 Jan 2026 07:27:27 +0800
vim-patch:16c2279: runtime(sh): highlight single-dash short options containing digits
fixes: vim/vim#19082
https://github.com/vim/vim/commit/16c22790627f063981ce75ef3d4da1eb4f6bf8d0
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
@@ -19,6 +19,7 @@
" 2025 Jul 18 properly delete :commands #17785
" 2025 Aug 23 bash: add support for ${ cmd;} and ${|cmd;} #18084
" 2025 Sep 23 simplify ksh logic, update sh statements #18355
+" 2026 Jan 15 highlight command switches that contain a digit
" }}}
" Version: 208
" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
@@ -345,7 +346,7 @@ endif
" Options: {{{1
" ====================
-syn match shOption "\s\zs[-+][-_a-zA-Z#@]\+"
+syn match shOption "\s\zs[-+][-_a-zA-Z#@0-9]\+"
syn match shOption "\s\zs--[^ \t$=`'"|);]\+"
" File Redirection Highlighted As Operators: {{{1