]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime: add missing fnameescape()/shellescape() in a few runtime files
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Mon, 29 Jun 2026 21:45:53 +0000 (21:45 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 29 Jun 2026 21:45:53 +0000 (21:45 +0000)
ping @jamessan for the debugchangelog change.

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/ada.vim
runtime/autoload/vimball.vim
runtime/ftplugin/debchangelog.vim

index 3f1b40398f4cee687a7d93777b7df4423002de5b..c4c572649e593ebf690d62e7af1bb7c8fc04b99d 100644 (file)
@@ -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
index 352e94d02d60dc6df84f3f72dfd9544b09a3b6a2..a1b2e7ffcef012ded243c62def0613b84e28d5e3 100644 (file)
@@ -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
 
index aa657a9b97e1edcaf3c61d518f5a47a54c75aaaa..f5bf432e3cb383ab8644d34d7320ea8452e5d38d 100644 (file)
@@ -3,7 +3,7 @@
 " Maintainer:   Debian Vim Maintainers <team+vim@tracker.debian.org>
 " Former Maintainers:   Michael Piefel <piefel@informatik.hu-berlin.de>
 "                       Stefano Zacchiroli <zack@debian.org>
-" 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 = []