Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!phoenix.Princeton.EDU!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul Falstad) Newsgroups: comp.unix.questions Subject: Re: Need to make "less" do a particular thing "right" Message-ID: <6451@idunno.Princeton.EDU> Date: 20 Feb 91 22:57:03 GMT References: <15903.27c29273@levels.sait.edu.au> <6435@idunno.Princeton.EDU> <1991Feb20.210427.26089@ux1.cso.uiuc.edu> Sender: news@idunno.Princeton.EDU Organization: The Royal Society For Putting Things On Top Of Other Things Lines: 29 phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) wrote: >I want to make the "less" command NOT switch over to the alterate screen. >I did RTFM and could not find this. I hate this behavior too. I don't think the FM tells how to get rid of it; I checked the source and it looks like there's no option for it. Here's the hack I use; works great for me. ---cut here--- #! /bin/sh # # a front end for less that does not make xterm swap screens # TERMCAP=`echo $TERMCAP | sed 's/:ti=[^:]*:te=[^:]*:/:ti=:te=:/'` \ /usr/princeton/bin/less "$@" ---cut here--- This could be done more efficiently, obviously. I have an environment variable called LESSTERM that I set in my .zlogin that has the ti and te entries removed; then I alias less to 'TERMCAP="$LESSTERM" /usr/local/bin/less'. With a csh-like shell you could do '(setenv TERMCAP LESSTERM; /usr/local/bin/less)'. I don't just remove ti and te from TERMCAP because I want vi to swap screens. -- Paul Falstad, pfalstad@phoenix.princeton.edu PLink:HYPNOS GEnie:P.FALSTAD I think there should be more race prejudice. LESS race prejudice. Princeton University apologizes for the content of this article.