summary refs log tree commit diff
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmou@users.sourceforge.net>2001-03-12 12:50:57 +0000
committerChmouel Boudjnah <chmou@users.sourceforge.net>2001-03-12 12:50:57 +0000
commit42ea0a6011a40b988eee720e4ad0f277247a7511 (patch)
treecee50eda441904fab71a770e33b0ebc0ce2c7fb5
parent58322ed03c4a97e6c53459a2fcc03c6594253431 (diff)
downloadzsh-42ea0a6011a40b988eee720e4ad0f277247a7511.tar.gz
zsh-42ea0a6011a40b988eee720e4ad0f277247a7511.tar.xz
zsh-42ea0a6011a40b988eee720e4ad0f277247a7511.zip
New tar options -j.
-rw-r--r--ChangeLog4
-rw-r--r--Completion/User/_tar2
-rw-r--r--Completion/User/_tar_archive12
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1799992c4..3c7b12e62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-03-12  Chmouel Boudjnah <chmouel@mandrakesoft.com>
+
+	* 13605: New tar options -j.
+
 2001-03-12  Oliver Kiddle  <opk@zsh.org>
 
 	* unposted: Completion/User/_zip, Completion/User/_hosts: handle
diff --git a/Completion/User/_tar b/Completion/User/_tar
index 9a71d8cef..634917233 100644
--- a/Completion/User/_tar
+++ b/Completion/User/_tar
@@ -125,6 +125,8 @@ elif [[ ( "$_tar_cmd" = *[xt]* || -n $del ) && -n "$tf" ]]; then
 
   if [[ $_tar_cmd = *z* ]]; then
     largs=-tzf
+  elif [[ $_tar_cmd = *j* ]]; then
+    largs=-tjf
   elif [[ $_tar_cmd = *y* ]]; then
     largs=-tyf
   elif [[ $_tar_cmd = *Z* ]]; then
diff --git a/Completion/User/_tar_archive b/Completion/User/_tar_archive
index 58e436c4d..e5a754e93 100644
--- a/Completion/User/_tar_archive
+++ b/Completion/User/_tar_archive
@@ -7,14 +7,20 @@
 # If your version of `tar' supports this you may want to complete
 # things like `host:file' or `user@host:file' here.
 
+local expl
+
 [[ $# -eq 0 && $+_tar_cmd -ne 0 ]] && set "$_tar_cmd"
 
+_description files expl 'archive file'
+
 if [[ "$1" = *[tx]* ]]; then
   if [[ "$1" = *[zZ]* ]]; then
-    _files -g '*.((tar|TAR).(gz|GZ|Z)|.tgz)'
+    _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|tgz)'
+  elif [[ "$1" = *[Ijy]* ]]; then
+    _files "$expl[@]" -g '*.(tar|TAR).bz2'
   else
-    _files -g '*.(tar|TAR)'
+    _files "$expl[@]" -g '*.(tar|TAR)'
   fi
 else
-  _files
+  _files "$expl[@]"
 fi