Gentoo Archives: gentoo-user

From: Harry Putnam <reader@×××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: dog - man's best friend.
Date: Sat, 25 Feb 2012 21:26:30
Message-Id: 877gzad2wb.fsf@newsguy.com
In Reply to: Re: [gentoo-user] Re: dog - man's best friend. by Paul Hartman
1 Paul Hartman <paul.hartman+gentoo@×××××.com> writes:
2
3 [...]
4
5 >>> (c) use less -F and less will automatically exit if the entire file can fit
6 >>> on one screen.  One can export LESS='-F' to have less always do the above.
7 >>
8 >> Maybe I'm seeing behavior that is not supposed to happen, but if I say
9 >> echo '## ONE LINE' > test
10 >>
11 >> And then say less -F test
12 >>
13 >> I do not get to see the one line.   I don't think that's what Alan
14 >> was looking for is it?
15 >
16 > It is caused by "alternate screen" handling in your terminal emulator.
17 > You can disable alternate screen in your terminal (if possible), or
18 > remove the smcup and rmcup directives from your termcap file.
19 >
20 > As a test, you can try this:
21 >
22 > export TERM=vt220
23 > less -F test
24 >
25 > it should display the one line file.
26 >
27 > Or you can use the -X option of less like Willie said which inhibits
28 > less from using the alternate screen.
29
30 OK, thanks for the input... good information. I'm not really likely
31 to use that command much or ever... but good to know.
32
33 I guess you see the same behavior I reported? That is, that a one
34 line file is not displayed with `less -F file' ?