From: Yasuhiro Matsumoto Date: Mon, 29 Jun 2026 21:45:53 +0000 (+0000) Subject: runtime: add missing fnameescape()/shellescape() in a few runtime files X-Git-Tag: v9.2.0753~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3fa4da4acb194660b7f44bba027af9f2120c27fe;p=thirdparty%2Fvim.git runtime: add missing fnameescape()/shellescape() in a few runtime files ping @jamessan for the debugchangelog change. Signed-off-by: Yasuhiro Matsumoto Signed-off-by: Christian Brabandt --- diff --git a/runtime/autoload/ada.vim b/runtime/autoload/ada.vim index 3f1b40398f..c4c572649e 100644 --- a/runtime/autoload/ada.vim +++ b/runtime/autoload/ada.vim @@ -25,6 +25,7 @@ " tweaking is done " 19.09.2007 NO still some mapleader problems " 31.01.2017 MB fix more mapleader problems +" 29.06.2026 Vim add fnameescpe/shellescape " Help Page: ft-ada-functions "------------------------------------------------------------------------------ @@ -423,14 +424,15 @@ endfunction ada#Completion_End " function ada#Create_Tags (option) if a:option == 'file' - let l:Filename = fnamemodify (bufname ('%'), ':p') + let l:Filename = shellescape (fnamemodify (bufname ('%'), ':p')) elseif a:option == 'dir' + let l:Dir = fnamemodify (bufname ('%'), ':p:h') let l:Filename = - \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " . - \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " . - \ fnamemodify (bufname ('%'), ':p:h') . "*.ads" + \ shellescape (l:Dir) . "*.ada " . + \ shellescape (l:Dir) . "*.adb " . + \ shellescape (l:Dir) . "*.ads" else - let l:Filename = a:option + let l:Filename = shellescape (a:option) endif execute '!ctags --excmd=number ' . l:Filename endfunction ada#Create_Tags diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim index 352e94d02d..a1b2e7ffce 100644 --- a/runtime/autoload/vimball.vim +++ b/runtime/autoload/vimball.vim @@ -1,7 +1,7 @@ " vimball.vim : construct a file containing both paths and files " Maintainer: This runtime file is looking for a new maintainer. " Original Author: Charles E. Campbell -" Date: May 20, 2026 +" Date: Jun 29, 2026 " Version: 37 (with modifications from the Vim Project) " GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim " Copyright: (c) 2004-2011 by Charles E. Campbell @@ -431,7 +431,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.gz' && executable("gzip") @@ -441,7 +441,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.gz$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bunzip2") @@ -451,7 +451,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz2' && executable("bzip2") @@ -461,7 +461,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.bz2$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz3' && executable("bunzip3") @@ -471,7 +471,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.bz3$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.bz3' && executable("bzip3") @@ -481,7 +481,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">") endif let fname= substitute(a:fname,'\.bz3$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif elseif expand("%") =~ '.*\.zip' && executable("unzip") @@ -491,7 +491,7 @@ fun! vimball#Decompress(fname,...) call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">") endif let fname= substitute(a:fname,'\.zip$','','') - exe "e ".escape(fname,' \') + exe "e ".fnameescape(fname) if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif endif diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim index aa657a9b97..f5bf432e3c 100644 --- a/runtime/ftplugin/debchangelog.vim +++ b/runtime/ftplugin/debchangelog.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Michael Piefel " Stefano Zacchiroli -" Last Change: 2023 Aug 18 +" Last Change: 2026 Jun 29 " License: Vim License " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/debchangelog.vim @@ -363,7 +363,7 @@ EOF return endif let pkgsrc = DebGetPkgSrcName(line('.')) - let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . pkgsrc . ' | grep "^ #" 2> /dev/null') + let listbugs_output = system('/usr/sbin/apt-listbugs -s ' . g:debchangelog_listbugs_severities . ' list ' . shellescape(pkgsrc) . ' | grep "^ #" 2> /dev/null') let bug_lines = split(listbugs_output, '\n') endif let completions = []