Commit: runtime(zip): Make ZipUpdatePS() check that shell is powershell

4 views
Skip to first unread message

Christian Brabandt

unread,
Mar 8, 2026, 11:46:57 AMMar 8
to vim...@googlegroups.com
runtime(zip): Make ZipUpdatePS() check that shell is powershell

Commit: https://github.com/vim/vim/commit/2c1269f0d34f6526f0aaff89b85e0a83e9233fe1
Author: Christian Brabandt <c...@256bit.org>
Date: Sun Mar 8 15:30:31 2026 +0000

runtime(zip): Make ZipUpdatePS() check that shell is powershell

fixes: https://github.com/vim/vim/issues/19576

Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
index 263c3555c..e81308fac 100644
--- a/runtime/autoload/zip.vim
+++ b/runtime/autoload/zip.vim
@@ -19,6 +19,7 @@
" 2025 Sep 22 by Vim Project: support PowerShell Core
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
" 2026 Feb 08 by Vim Project: use system() instead of :!
+" 2026 Mar 08 by Vim Project: Make ZipUpdatePS() check for powershell
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -159,7 +160,7 @@ endfunction
function! s:ZipUpdatePS(zipfile, fname)
" Update a filename within a zipped file
" Equivalent to `zip -u zipfile fname`
- if a:fname =~ '/'
+ if &shell =~ 'pwsh' && a:fname =~ '/'
call s:Mess('Error', "***error*** PowerShell cannot update files in archive subfolders")
return ':'
endif
Reply all
Reply to author
Forward
0 new messages