Bug#407278: better stdin patch for zless
tags 407278 + patch thanks On 10 August 2009 02:35, Piotr Engelking wrote: > The attached patch enables zless to correctly view standard input > without changing its behavior in other cases. > > There is still, however, one remaining problem - the patch depends on a > functionality introduced in less 429-1 and I am not sure how to sanely > express such a dependency, given that gzip merely suggests less. Any > suggestions? Now that stable has less 443-1, the dependency is no longer needed, and the patch can be used as-is. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#407278: better stdin patch for zless
On 14 May 2011 10:54, Piotr Engelking wrote: > Now that stable has less 443-1, the dependency is no longer needed, > and the patch can be used as-is. Erm, 436-1, which luckily doesn't change the conclusion. :P -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#407278: better stdin patch for zless
The attached patch enables zless to correctly view standard input without changing its behavior in other cases. There is still, however, one remaining problem - the patch depends on a functionality introduced in less 429-1 and I am not sure how to sanely express such a dependency, given that gzip merely suggests less. Any suggestions? diff -ur gzip-1.3.12/zless.1 gzip/zless.1 --- gzip-1.3.12/zless.1 2009-08-09 22:39:40.0 +0200 +++ gzip/zless.1 2009-08-10 02:02:46.641941863 +0200 @@ -8,7 +8,7 @@ .I Zless is a filter which allows examination of compressed or plain text files one screenful at a time on a soft-copy terminal. It is the equivalent of -setting the environment variable LESSOPEN to '|gzip -cdfq -- %s', +setting the environment variable LESSOPEN to '|-gzip -cdfq -- %s', and the environment variable LESSMETACHARS to "';*?"()<>[|&^`#\\$%=~'", and then running @@ -21,12 +21,6 @@ filters. .SH "SEE ALSO" zmore(1), less(1), lessfile(1), lesspipe(1) -.SH "BUGS" -.I Zless -does not work with compressed data that is piped to it via standard -input; it requires that input files be specified as arguments. -If you really want to use less in a pipe, -then do the uncompress explicitly and pipe to less instead of using zless. .SH "COPYRIGHT NOTICE" Copyright \(co 2006 Free Software Foundation, Inc. .br diff -ur gzip-1.3.12/zless.in gzip/zless.in --- gzip-1.3.12/zless.in 2007-02-05 21:54:26.0 +0100 +++ gzip/zless.in 2009-08-10 02:00:04.188624923 +0200 @@ -49,5 +49,5 @@ export LESSMETACHARS fi -LESSOPEN="|gzip -cdfq -- %s"; export LESSOPEN +LESSOPEN="|-gzip -cdfq -- %s"; export LESSOPEN exec less "$@"
Bug#407278: better stdin patch for zless
On Mon, Aug 10, 2009 at 02:35:55AM +0200, Piotr Engelking wrote: ... > functionality introduced in less 429-1 and I am not sure how to sanely > express such a dependency, given that gzip merely suggests less. Any > suggestions? - tell about it the docs/man - patch zless like eg: ! #!/bin/sh ! PATH="/usr/bin:$PATH"; export PATH ! v=`less --version` ! v=${v#* } ! v=${v%%[ [:cntrl:]]*} ! if [ $v -lt 429 ]; then ! LESSOPEN="|gzip -cdfq %s"; export LESSOPEN ! else ! LESSOPEN="|-gzip -cdfq %s"; export LESSOPEN ! fi ! exec less "$@" -- paolo -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org