runtime(zip): Make ZipUpdatePS() check that shell is powershell
Commit:
https://github.com/vim/vim/commit/2c1269f0d34f6526f0aaff89b85e0a83e9233fe1
Author: Christian Brabandt <[email protected]>
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 <[email protected]>
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
--
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vzGJU-00D04o-MV%40256bit.org.