runtime(zip): support PowerShell Core

fixes: #17987
closes: #18345

Signed-off-by: Shay <shay_public@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Shay
2025-09-22 19:02:24 +00:00
committed by Christian Brabandt
parent 94c128184f
commit 70d745a61b
2 changed files with 162 additions and 14 deletions

View File

@ -1,4 +1,4 @@
*pi_zip.txt* For Vim version 9.1. Last change: 2025 Jul 15
*pi_zip.txt* For Vim version 9.1. Last change: 2025 Sep 22
+====================+
| Zip File Interface |
@ -50,7 +50,7 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
allow spaces and whatnot in filenames; however, if it is incorrectly
guessing the quote to use for your setup, you may use >
g:zip_shq
< which by default is a single quote under Unix (') and a double quote
< which by default is a single quote under Unix (') and a double quote
under Windows ("). If you'd rather have no quotes, simply set
g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>.
@ -77,6 +77,16 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
"0": >
let g:zip_exec=0
<
FALLBACK TO POWERSHELL CORE~
This plugin will first attempt to use the (more capable) GNU zip/unzip
commands. If these commands are not available or fail, and the user is
using PowerShell Core (i.e., the 'shell' option matches "pwsh"), the
plugin will fall back to a PowerShell Core cmdlet. The PowerShell Core
cmdlets are limited: they cannot write or extract files within
subdirectories of a zip archive. The advantage, however, is that no
separate unzip binary needs to be installed.
PREVENTING LOADING~
If for some reason you do not wish to use vim to examine zipped files,
@ -112,6 +122,7 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
==============================================================================
4. History *zip-history* {{{1
unreleased:
Sep 19, 2025 * support PowerShell Core
Jul 12, 2025 * drop ../ on write to prevent path traversal attacks
Mar 11, 2025 * handle filenames with leading '-' correctly
Aug 21, 2024 * simplify condition to detect MS-Windows