about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_zip6
1 files changed, 2 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_zip b/Completion/Unix/Command/_zip
index 7d4509e6f..6f83b748f 100644
--- a/Completion/Unix/Command/_zip
+++ b/Completion/Unix/Command/_zip
@@ -1,6 +1,6 @@
 #compdef zip unzip zipinfo
 
-local suffixes suf zipfile izip uzi
+local suffixes suf zipfile uzi
 local expl curcontext="$curcontext" state line
 typeset -A opt_args
 
@@ -114,9 +114,7 @@ case $state in
     if [[ $service = zip ]] && (( ! ${+opt_args[-d]} )); then
       _files -g '^(#i)*.(zip|[jw]ar)' && return 0
     else
-      (( izip = 1 + words[(I)-[^xi]*] ))
-      (( izip == 1 )) && (( izip++ ))
-      zipfile=( $~words[izip](|.zip|.ZIP) )
+      zipfile=( $~line[1](|.zip|.ZIP) )
       [[ -z $zipfile[1] ]] && return 1
       if [[ $zipfile[1] !=  $_zip_cache_list ]]; then
 	_zip_cache_name="$zipfile[1]"