about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authordana <dana@dana.is>2020-02-07 14:05:48 -0600
committerdana <dana@dana.is>2020-02-07 14:05:48 -0600
commit8037462895b4de98528a6b56c2f35d606150d3f3 (patch)
treec33ab2575c0a1efee70afb7c2abbdd3a21613bac /Completion/Unix/Command
parent699dfdd0ea25d01177f603461473f4e0c88f7378 (diff)
downloadzsh-8037462895b4de98528a6b56c2f35d606150d3f3.tar.gz
zsh-8037462895b4de98528a6b56c2f35d606150d3f3.tar.xz
zsh-8037462895b4de98528a6b56c2f35d606150d3f3.zip
unposted: _zip: Recognise '--'
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_zip6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_zip b/Completion/Unix/Command/_zip
index 1b1b6c315..bc9aab1a5 100644
--- a/Completion/Unix/Command/_zip
+++ b/Completion/Unix/Command/_zip
@@ -82,7 +82,7 @@ case $service in
       '*:file:->files' && ret=0
   ;;
   unzip)
-    _arguments -C -s \
+    _arguments -C -s -S \
       '(-Z)-M[page output]' \
       - unzip \
       '(-f -u -l -t -z -d -p)-c[extract files to stdout including file names]' \
@@ -130,7 +130,7 @@ esac
 [[ $state == zipinfo ]] && uzi="-Z[zipinfo mode]"
 
 if [[ $service == zipinfo ]] || [[ -n $uzi ]]; then
-    _arguments -C -s \
+    _arguments -C -s -S \
       $uzi \
       '(-2 -s -m -l -v -h -t -T -z)-1[filenames only]' \
       '(-1 -s -m -l -v -T)-2[just filenames but allow -h/-t/-z]' \
@@ -170,7 +170,7 @@ case $state in
       fi 2>/dev/null
       if [[ $zipfile !=  $_zip_cache_name ]]; then
 	_zip_cache_name="$zipfile"
-	_zip_cache_list=( ${(f)"$(zipinfo -1 $_zip_cache_name)"} )
+	_zip_cache_list=( ${(f)"$(zipinfo -1 -- $_zip_cache_name)"} )
       fi
      _wanted files expl 'file from archive' \
 	 _multi_parts / _zip_cache_list && return