diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2002-01-02 17:14:08 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2002-01-02 17:14:08 +0000 |
commit | eabe9ea6f8115f3f385a4407459ed574954da460 (patch) | |
tree | ac30662c261c1537bd42b83567437254a7809328 | |
parent | 8074e07a2ced99c4464d4a72cb93f47a7aacf34b (diff) | |
download | zsh-eabe9ea6f8115f3f385a4407459ed574954da460.tar.gz zsh-eabe9ea6f8115f3f385a4407459ed574954da460.tar.xz zsh-eabe9ea6f8115f3f385a4407459ed574954da460.zip |
users/4561: fix code for finding the zipfile's name in the current command-line
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Unix/Command/_zip | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index ccc439102..7820a2b7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2002-01-02 Oliver Kiddle <opk@zsh.org> + * users/4561: Completion/Unix/Command/_zip: fix bug with finding + the zipfile's name in the current command-line. + * 16384: Completion/X/Type/.distfiles, Completion/X/Type/_x_visual, Completion/X/Command/.distfiles, Completion/X/Command/_xloadimage, Completion/X/Command/_netscape, Completion/X/Command/_x_utils, 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]" |