about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2013-05-29 19:21:34 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-05-29 19:21:34 +0100
commit95c044372a4b945761940de64eed87c30f2d555e (patch)
treeea2138f3fe87d34f2d82101e7126833f464580ce
parent711c103e77cf362b7222de5062127df2ffe7a1f1 (diff)
downloadzsh-95c044372a4b945761940de64eed87c30f2d555e.tar.gz
zsh-95c044372a4b945761940de64eed87c30f2d555e.tar.xz
zsh-95c044372a4b945761940de64eed87c30f2d555e.zip
31433: zcat -f doesn't need suffix .gz
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_gzip6
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e92942fa1..65f18c2f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-05-29  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 31433: Completion/Unix/Command/_gzip: zcat -f doesn't
+	need files with suffix .gz.
+
 	* 31422: Doc/Zsh/calsys.yo, Functions/Calendar/age: better
 	heuristic for timestamps in use of :file feature.
 
diff --git a/Completion/Unix/Command/_gzip b/Completion/Unix/Command/_gzip
index 5c88fac39..a90f23273 100644
--- a/Completion/Unix/Command/_gzip
+++ b/Completion/Unix/Command/_gzip
@@ -82,7 +82,11 @@ files)
       _files "$expl[@]" -g '^*.(([tT]|)[gG]|)[zZ](-.)' && return
     else
       _description files expl 'compressed file'
-      _files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ](-.)' && return
+      if (( $+opt_args[-f] )); then
+	_files "$expl[@]" && return
+      else
+	_files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ](-.)' && return
+      fi
     fi
   fi
   ;;