Stroller writes:
> On 12 May 2012, at 22:49, Alex Schuster wrote:
[...]
> >> How do I disable less from parsing html source, please?
> >
> > You can set LESSIGNORE='*.htm*'. This environment variable is used by
> > the lesspipe command, which is invoked by less and filters the input
> > file before giving it to less itself.
>
> Contrary to my previous email, sent in error, that does NOT work.
>
> Did you check this yourself?
Yes. I did not know about this mechanism before, but 'env|grep -i less'
showed the LESS and LESSOPEN environment variable, so I learnt about the
lesspipe command. lesspipe -h gives a little info, LESSIGNORE is shown
there.
> $ LESSOPEN="" less file.html # works fine
It should, for any type of file.
> $ LESSIGNORE='*.htm*' less file.html #does not
Working fine here.
> I've also tried `export LESSIGNORE='*.htm*'` (for what difference that
> makes?) and tried running the `less` command on a separate line.
There is no difference, but it's more convenient to export the variable as
you do not have to set it every time then.
> What version of less are you using, please? I have =sys-apps/less-444
> installed here.
445-r1, but I just downgraded to 444, and it behaves the same. I have the
pcre and unicode USE flags set, but don't assume they make any
difference. Weird, no idea why it it not working for you.
Wonko