From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-apps/less/files: lesspipe.sh |
Date: | Fri, 18 Apr 2008 19:58:17 |
Message-Id: | E1Jmwis-0000SE-AH@stork.gentoo.org |
1 | vapier 08/04/18 19:58:14 |
2 | |
3 | Modified: lesspipe.sh |
4 | Log: |
5 | add support for a LESSIGNORE variable as suggested by d_m@××××××××××××××××.com #217954 |
6 | (Portage version: 2.2_pre5) |
7 | |
8 | Revision Changes Path |
9 | 1.29 sys-apps/less/files/lesspipe.sh |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.29&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?rev=1.29&content-type=text/plain |
13 | diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/less/files/lesspipe.sh?r1=1.28&r2=1.29 |
14 | |
15 | Index: lesspipe.sh |
16 | =================================================================== |
17 | RCS file: /var/cvsroot/gentoo-x86/sys-apps/less/files/lesspipe.sh,v |
18 | retrieving revision 1.28 |
19 | retrieving revision 1.29 |
20 | diff -u -r1.28 -r1.29 |
21 | --- lesspipe.sh 16 Apr 2008 17:33:38 -0000 1.28 |
22 | +++ lesspipe.sh 18 Apr 2008 19:58:13 -0000 1.29 |
23 | @@ -49,6 +49,11 @@ |
24 | ~/.lessfilter "$1" && exit 0 |
25 | fi |
26 | |
27 | + local ignore |
28 | + for ignore in ${LESSIGNORE} ; do |
29 | + [[ ${match} == *.${ignore} ]] && exit 0 |
30 | + done |
31 | + |
32 | case "$match" in |
33 | |
34 | ### Doc files ### |
35 | @@ -224,7 +229,7 @@ |
36 | echo "Usage: lesspipe.sh <file>" |
37 | elif [[ $1 == "-V" || $1 == "--version" ]] ; then |
38 | Id="cvsid" |
39 | - cvsid="$Id: lesspipe.sh,v 1.28 2008/04/16 17:33:38 vapier Exp $" |
40 | + cvsid="$Id: lesspipe.sh,v 1.29 2008/04/18 19:58:13 vapier Exp $" |
41 | cat <<-EOF |
42 | $cvsid |
43 | Copyright 2001-2008 Gentoo Foundation |
44 | @@ -243,6 +248,7 @@ |
45 | lesspipe.sh specific settings: |
46 | LESSCOLOR env - toggle colorizing of output |
47 | LESSCOLORIZER env - program used to colorize output (default: code2color) |
48 | + LESSIGNORE - list of extensions to ignore (don't do anything fancy) |
49 | |
50 | You can create per-user filters as well by creating the executable file: |
51 | ~/.lessfilter |
52 | |
53 | |
54 | |
55 | -- |
56 | gentoo-commits@l.g.o mailing list |