Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] less file.html
Date: Sun, 13 May 2012 04:14:41
Message-Id: 325648E2-4F6B-4C58-A066-F72520A3D2B1@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] less file.html by Alex Schuster
1 On 13 May 2012, at 00:22, Alex Schuster wrote:
2 > …
3 >>> You can set LESSIGNORE='*.htm*'. This environment variable is used by
4 >>> the lesspipe command, which is invoked by less and filters the input
5 >>> file before giving it to less itself.
6 >>
7 >> Contrary to my previous email, sent in error, that does NOT work.
8 >>
9 >> Did you check this yourself?
10 >
11 > Yes. I did not know about this mechanism before, but 'env|grep -i less'
12 > showed the LESS and LESSOPEN environment variable, so I learnt about the
13 > lesspipe command. lesspipe -h gives a little info, LESSIGNORE is shown
14 > there.
15
16 I have here now:
17
18 $ env | grep -i less
19 PAGER=/usr/bin/less
20 LESS=-R -M --shift 5
21 LESSOPEN=|lesspipe %s
22 LESSIGNORE=*.htm*
23 $
24
25 And still the same thing.
26
27 >> What version of less are you using, please? I have =sys-apps/less-444
28 >> installed here.
29 >
30 > 445-r1, but I just downgraded to 444, and it behaves the same. I have the
31 > pcre and unicode USE flags set, but don't assume they make any
32 > difference. Weird, no idea why it it not working for you.
33
34 Thanks for your help.
35
36 `less -L file.html` works for me - I've got a way of dealing with this, and I'm busy with other stuff right now, so I'm just going to forget worrying about LESSIGNORE.
37
38 I post the above output showing my less environment only for the benefit of anyone else encountering this in the future - perhaps it gives them something to go on.
39
40 I appreciate your assistance,
41
42 Stroller.

Replies

Subject Author
Re: [gentoo-user] less file.html Paul Colquhoun <paulcol@×××××××××××××××××.au>