Gentoo Archives: gentoo-dev

From: Ben Beuchler <insyte@×××××.org>
To: Gentoo Dev List <gentoo-dev@××××××××××.org>
Subject: [gentoo-dev] Using less with compressed docs -- tip!
Date: Sat, 08 Sep 2001 15:43:17
Message-Id: 20010908164251.A25155@emt-p.org
1 Gentoo, by default, compresses any documetation installed by a program. Or so
2 it appears, anyway. Viewing these files transparently is pretty easy. First,
3 create a script like this:
4
5 ----------
6 #!/bin/sh
7
8 case "$1" in
9 *.gz) gunzip -c $1 2>/dev/null
10 ;;
11 esac
12 ----------
13
14 And put it somewhere easily accessible, like /usr/local/bin/lesspipe.sh.
15
16 Now do this:
17
18 export LESSOPEN="|/usr/local/bin/lesspipe.sh %s"
19
20 You'll probably want to stick that in /etc/profile or something. Now if you
21 try to use less top open a .gz file, it will work transparently.
22
23 -Ben
24
25 --
26 Ben Beuchler There is no spoon.
27 insyte@×××××.org -- The Matrix

Replies

Subject Author
Re: [gentoo-dev] Using less with compressed docs -- tip! Morgan Christiansson <sft3905@××××××××××××.se>
Re: [gentoo-dev] Using less with compressed docs -- tip! Karl Trygve Kalleberg <karltk@×××××××.no>