aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/nvim/zip.lua
diff options
context:
space:
mode:
authorBarrett Ruth <br@barrettruth.com>2026-07-29 14:56:26 -0500
committerBarrett Ruth <br@barrettruth.com>2026-07-29 14:56:26 -0500
commit3fdb74748af936c46d883ebc68ac3735e92fa802 (patch)
tree2e4a7e0f94e71a6bf68c35b5e6dd11575617458b /runtime/lua/nvim/zip.lua
parent1bba96f259b53ff09d40f18949737ba049366eaa (diff)
downloadrneovim-3fdb74748af936c46d883ebc68ac3735e92fa802.tar.gz
rneovim-3fdb74748af936c46d883ebc68ac3735e92fa802.tar.bz2
rneovim-3fdb74748af936c46d883ebc68ac3735e92fa802.zip
fix: review
Diffstat (limited to 'runtime/lua/nvim/zip.lua')
-rw-r--r--runtime/lua/nvim/zip.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/lua/nvim/zip.lua b/runtime/lua/nvim/zip.lua
index 7b3c2e000c..39018d517e 100644
--- a/runtime/lua/nvim/zip.lua
+++ b/runtime/lua/nvim/zip.lua
@@ -13,7 +13,13 @@ local function unzip()
return command
end
---- Escape a path passed to Info-ZIP, which expands glob patterns even without a shell.
+--- Escape a path so that Info-ZIP matches it literally.
+---
+--- Info-ZIP matches `*`, `?`, and `[]` in a member selector itself, so this is not shell
+--- quoting: passing argv already avoids the shell. For example, unescaped `a[a].txt`
+--- silently reads `aa.txt`, and `a?.txt` matches every four-character name. A literal `[`
+--- cannot be backslash-escaped, so it is wrapped in a class instead, as is a leading `-`,
+--- which would otherwise parse as an option.
--- https://github.com/neovim/neovim/blob/7ba955fe079d4aa2554fea8e7235651fafd40efb/runtime/autoload/zip.vim#L316-L339
---@param value string
---@return string