public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Using less with compressed docs -- tip!
@ 2001-09-08 15:44 Ben Beuchler
  2001-09-08 17:02 ` Morgan Christiansson
  2001-09-09 10:22 ` Karl Trygve Kalleberg
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Beuchler @ 2001-09-08 15:44 UTC (permalink / raw
  To: Gentoo Dev List

Gentoo, by default, compresses any documetation installed by a program.  Or so
it appears, anyway.  Viewing these files transparently is pretty easy.  First,
create a script like this:

----------
#!/bin/sh

case "$1" in
    *.gz) gunzip -c $1 2>/dev/null
    ;;
esac
----------

And put it somewhere easily accessible, like /usr/local/bin/lesspipe.sh.

Now do this:

export LESSOPEN="|/usr/local/bin/lesspipe.sh %s" 

You'll probably want to stick that in /etc/profile or something.  Now if you
try to use less top open a .gz file, it will work transparently.

-Ben

-- 
Ben Beuchler                                           There is no spoon.
insyte@emt-p.org                                            -- The Matrix



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-09 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-08 15:44 [gentoo-dev] Using less with compressed docs -- tip! Ben Beuchler
2001-09-08 17:02 ` Morgan Christiansson
2001-09-09 10:22 ` Karl Trygve Kalleberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox