Even less from LESS

Even less from LESS

Post by Paul Moore Mck » Wed, 29 Oct 1997 04:00:00



Hi-

I've got a Slackware Linux box running damn near perfectly.  One problem
that has been annoying me, though is with less.  It seems that, only
when I'm in an xterm (ie, term=xterm), less clears the screen when it's
finished.  If you type less <filename> at a prompt, the file (if it's
big enough) will fill the entire screen.  Everything behaves normally.
At the end of the file, though, all traces of the contents of the file
are cleared and you see the original screen from which you started less
reappear, with a new command prompt below the first.

I've noticed that if I set term=vt100, the problem goes away and when I
reach the end of a file, I get a new prompt on the line below the last
line of the file - just as cat would do and just what you normally
expect.

I use LESS=-E -m -n, but I don't think that has to do with it.  A
friend's system does not have this behavior in xterms, though I can't
figure out why.

Paul McKee

 
 
 

Even less from LESS

Post by Jeffrey Anderso » Wed, 29 Oct 1997 04:00:00



Quote:> I've got a Slackware Linux box running damn near perfectly.  One problem
> that has been annoying me, though is with less.  It seems that, only
> when I'm in an xterm (ie, term=xterm), less clears the screen when it's
> finished.  If you type less <filename> at a prompt, the file (if it's
> big enough) will fill the entire screen.  Everything behaves normally.
> At the end of the file, though, all traces of the contents of the file
> are cleared and you see the original screen from which you started less
> reappear, with a new command prompt below the first.

The problem, if it is one, lies in your /etc/termcap file.  Apparently
your deinitialization string for TERM=xterm clears the screen.  To get
the behaviour you desire, either edit your termcap, or use `less -X`,
which disables termcap initialization and deinitialization for less.
I recommend the second option, myself.

Jeff Anderson


 
 
 

Even less from LESS

Post by John E. Dav » Thu, 30 Oct 1997 04:00:00




Quote:>that has been annoying me, though is with less.  It seems that, only
>when I'm in an xterm (ie, term=xterm), less clears the screen when it's
>finished.  If you type less <filename> at a prompt, the file (if it's
>big enough) will fill the entire screen.  Everything behaves normally.
>At the end of the file, though, all traces of the contents of the file
>are cleared and you see the original screen from which you started less
>reappear, with a new command prompt below the first.

The problem is not with `less', it is with your termcap/terminfo file
for xterm.  In particular, I suspect that your termcap `ti' and `te'
strings contain the appropriate escape sequences to use the alternate
xterm screen.

--John

 
 
 

Even less from LESS

Post by s. keeli » Thu, 30 Oct 1997 04:00:00



Quote:

> I've got a Slackware Linux box running damn near perfectly.  One problem
> that has been annoying me, though is with less.  It seems that, only
> when I'm in an xterm (ie, term=xterm), less clears the screen when it's
> finished.  If you type less <filename> at a prompt, the file (if it's

See the manpage on the -X option (disables sending termcap
initialization and de-initialization strings to the terminal).

--

                  Contract Programmer; inquire within.

       zcat /usr/doc/timezone/Introduction.gz |*ney | less

 
 
 

1. pipe data to less of (xterm -e less) ?

Hi,

Please help me to solve this. The command:

        cat data | xterm -e less

does not work. Note that the less has to read
from stdin in my case (I'm in a GUI and am reading
output from paste).

Any trick available?

Thanks for your help!

--
Nan-shan Chen, Pohlweg 47-49, 33098, FB14, Uni-Paderborn

2. printing through NT print server.

3. Less and less

4. checking if file in use - please help me out here

5. less -X with less effect

6. ftp and passive tranfer

7. : linux-2.5.46-uc0 (MMU-less fixups)

8. Why do I need Linux?

9. ANNOUNCE - Aview 1.1 - an ascii art image browser (less broken version)

10. How make less not clear the screen?

11. less technical user groups that aren't so over my head?

12. One less objection to Linux

13. Jumper-less IDE-controler