Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: 3.1.6-pws-5: _tar



_tar can't handle reading from tar archives if the archive name begins with
a ~.  The following handles it the simplest way, but there are still
possible quoting problems.

--- Completion/User/_tar~	Mon Aug 30 17:27:36 1999
+++ Completion/User/_tar	Fri Sep 24 10:00:28 1999
@@ -53,15 +53,15 @@
 
 tmp="$words[(I)--file=*]"
 if (( tmp )); then
-  tf="${words[tmp][8,-1]}"
+  tf=${~words[tmp][8,-1]}
   _tar_cmd="f$_tar_cmd"
 elif [[ "$words[2]" != -* && "$words[2]" = *f* ]]; then
-  tf="$words[3]"
+  tf=${~words[3]}
   _tar_cmd="f$_tar_cmd"
 else
   tmp="${words[(I)-*f*~--*]}"
   if (( tmp )); then
-    tf="$words[tmp+1]"
+    tf=${~words[tmp+1]}
     _tar_cmd="f$_tar_cmd"
   fi
 fi

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author