[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/share/doc/ files and gzip/xz/no compression

On 16/08/2011 16:08, Alexander Reichle-Schmehl wrote:
> Hi!
> Am 16.08.2011 02:43, schrieb Russell Coker:
>> I'd like to see zless work transparently with bzip and xz compressed files.  
>> There's really no need for three different wrapper programs when the zless 
>> program can just consult the magic db to determine which decompression program 
>> to use.
> FWIW, if you the following in your bashrc:
> if [ -f /usr/bin/lesspipe ]; then
>     eval "$(lesspipe)"
> fi
> you can just "less somegzfile" or "less somebzipfile".  In squeeze you
> can't use less on a xz compressed file, but I guess that could be added.

That works when you do "less somefile.gz" or something, but doesn't work out so
well on gz/bz2 streams, unfortunately. Isn't it possible to detect this based on
some magic strings at the beginning of the stream?

Kind regards,
Loong Jin

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: