Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] less file.html
Date: Sat, 12 May 2012 23:24:28
Message-Id: 20120513012245.7d5ee035@weird.wonkology.org
In Reply to: Re: [gentoo-user] less file.html by Stroller
1 Stroller writes:
2
3 > On 12 May 2012, at 22:49, Alex Schuster wrote:
4 [...]
5 > >> How do I disable less from parsing html source, please?
6 > >
7 > > You can set LESSIGNORE='*.htm*'. This environment variable is used by
8 > > the lesspipe command, which is invoked by less and filters the input
9 > > file before giving it to less itself.
10 >
11 > Contrary to my previous email, sent in error, that does NOT work.
12 >
13 > Did you check this yourself?
14
15 Yes. I did not know about this mechanism before, but 'env|grep -i less'
16 showed the LESS and LESSOPEN environment variable, so I learnt about the
17 lesspipe command. lesspipe -h gives a little info, LESSIGNORE is shown
18 there.
19
20 > $ LESSOPEN="" less file.html # works fine
21
22 It should, for any type of file.
23
24 > $ LESSIGNORE='*.htm*' less file.html #does not
25
26 Working fine here.
27
28 > I've also tried `export LESSIGNORE='*.htm*'` (for what difference that
29 > makes?) and tried running the `less` command on a separate line.
30
31 There is no difference, but it's more convenient to export the variable as
32 you do not have to set it every time then.
33
34 > What version of less are you using, please? I have =sys-apps/less-444
35 > installed here.
36
37 445-r1, but I just downgraded to 444, and it behaves the same. I have the
38 pcre and unicode USE flags set, but don't assume they make any
39 difference. Weird, no idea why it it not working for you.
40
41 Wonko

Replies

Subject Author
Re: [gentoo-user] less file.html Stroller <stroller@××××××××××××××××××.uk>