about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2001-03-12 09:34:03 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2001-03-12 09:34:03 +0000
commit58322ed03c4a97e6c53459a2fcc03c6594253431 (patch)
tree9e76184fbd2e00ceaa8816d849c0036360069ce1
parent1382a4a8920d533fc684535328adf20976ff69fb (diff)
downloadzsh-58322ed03c4a97e6c53459a2fcc03c6594253431.tar.gz
zsh-58322ed03c4a97e6c53459a2fcc03c6594253431.tar.xz
zsh-58322ed03c4a97e6c53459a2fcc03c6594253431.zip
fix filename quoting in _zip and don't use _hosts for lftp
-rw-r--r--ChangeLog6
-rw-r--r--Completion/User/_hosts2
-rw-r--r--Completion/User/_zip10
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 12199da58..1799992c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-12  Oliver Kiddle  <opk@zsh.org>
+
+	* unposted: Completion/User/_zip, Completion/User/_hosts: handle
+	filenames containing spaces in zip archives and don't complete lftp
+	from _hosts
+
 2001-03-12  Chmouel Boudjnah <chmouel@mandrakesoft.com>
 
 	* 13601: Completion/User/_lftp: Add completion for lftp
diff --git a/Completion/User/_hosts b/Completion/User/_hosts
index f41097f96..fc2970cb9 100644
--- a/Completion/User/_hosts
+++ b/Completion/User/_hosts
@@ -1,4 +1,4 @@
-#compdef ftp ping rwho rup xping traceroute host lftp
+#compdef ftp ping rwho rup xping traceroute host
 
 local expl hosts
 
diff --git a/Completion/User/_zip b/Completion/User/_zip
index d6bb2d835..b01b756af 100644
--- a/Completion/User/_zip
+++ b/Completion/User/_zip
@@ -99,9 +99,10 @@ esac
 case $state in
   suffixes)
     compset -P '*:'
-    compset -S ':*' || suf=":"
+    compset -S ':*' || suf=":."
     suffixes=( *.*(N:e) )
-    _wanted suffixes expl suffixes compadd -S "$suf" -r " " .$^suffixes && return 0
+    _wanted suffixes expl suffixes \
+	compadd -S "$suf" -r ": \t" .$^suffixes && return 0
   ;;
   files)
     if [[ $service = zip ]] && (( ! ${+opt_args[-d]} )); then
@@ -113,9 +114,10 @@ case $state in
       [[ -z $zipfile[1] ]] && return 1
       if [[ $zipfile[1] !=  $_zip_cache_list ]]; then
 	_zip_cache_name="$zipfile[1]"
-	_zip_cache_list=( $(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
+     _wanted files expl 'file from archive' \
+	 _multi_parts / _zip_cache_list && return 0
     fi
   ;;
 esac