runtime(sh): properly delete shell commands in syntax file Commit: https://github.com/vim/vim/commit/ba3a5a7372e7e41ef0153d05295b97bb06b57342 Author: Christoffer Aasted <chr.aas...@gmail.com> Date: Fri Jul 18 20:25:59 2025 +0200
runtime(sh): properly delete shell commands in syntax file closes: https://github.com/vim/vim/issues/17785 Signed-off-by: Christoffer Aasted <chr.aas...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 3e0a481fb..9cee161ac 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -3,7 +3,7 @@ " Maintainer: This runtime file is looking for a new maintainer. " Previous Maintainers: Charles E. Campbell " Lennart Schultz <lennart.schu...@ecmwf.int> -" Last Change: 2024 Mar 04 by Vim Project +" Last Change: 2024 Mar 04 by Vim Project {{{1 " 2024 Nov 03 by Aliaksei Budavei <0x000c70 AT gmail DOT com> (improved bracket expressions, #15941) " 2025 Jan 06 add $PS0 to bashSpecialVariables (#16394) " 2025 Jan 18 add bash coproc, remove duplicate syn keywords (#16467) @@ -16,6 +16,8 @@ " 2025 May 10 improve wildcard character class lists " 2025 May 21 improve supported KornShell features " 2025 Jun 16 change how sh_fold_enabled is reset (#17557) +" 2025 Jul 18 properly delete :commands #17785 +" }}} " Version: 208 " Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax @@ -174,9 +176,15 @@ endif " Set up folding commands for shell {{{1 " ================================= -sil! delc ShFoldFunctions -sil! delc ShFoldHereDoc -sil! delc ShFoldIfDoFor +if exists(":ShFoldFunctions") == 2 + delc ShFoldFunctions +endif +if exists(":ShFoldIfHereDoc") == 2 + delc ShFoldHereDoc +endif +if exists(":ShFoldIfDoFor") == 2 + delc ShFoldIfDoFor +endif if s:sh_fold_functions com! -nargs=* ShFoldFunctions <args> fold else -- -- 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/E1ucq4u-00DgRm-8l%40256bit.org.