Package: gzip
Version: 1.3.5-15
Severity: normal

hi,

it's a long standing bug:

% zless file.gz

works, while 

% zless < file.gz

doesn't. That'd be useful in eg mutt when piping out .gz attachments.
Following patch makes zless work on pipes like eg bzless.

#--[zless.diff]------------
--- /bin/zless.orig     Wed Jan 17 11:42:33 2007
+++ /bin/zless  Wed Jan 17 11:41:16 2007
@@ -1,4 +1,8 @@
 #!/bin/sh
 PATH="/usr/bin:$PATH"; export PATH
-LESSOPEN="|gzip -cdfq %s"; export LESSOPEN
-exec less "$@"
+case $# in
+  0) LESS="gzip -cdq | less" ;;
+  *) LESS="gzip -cdfq \"$1\" | less" ;;
+esac
+eval exec $LESS
+
#--------------------------

--
paolo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to