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 21:52:32
Message-Id: 20120512234944.49a96c8f@weird.wonkology.org
In Reply to: [gentoo-user] less file.html by Stroller
1 Stroller writes:
2
3 > I want to view the html source of a webpage.
4 >
5 > When I run `less file.html` the rendered webpage is shown, not the
6 > source. It is as if lynx had been invoked, rather than less.
7 >
8 > `more file.html` and `most file.html` both work fine, but this is
9 > annoying - it takes an effort to prevent my fingers from typing `less`.
10 >
11 > How do I disable less from parsing html source, please?
12
13 You can set LESSIGNORE='*.htm*'. This environment variable is used by the
14 lesspipe command, which is invoked by less and filters the input file
15 before giving it to less itself.
16 The is, if LESSOPEN='|lesspipe %s', which is set for me as such
17 in /etc/env.d/70less.
18
19 Wonko

Replies

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