From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8640 invoked from network); 15 Oct 1998 09:19:42 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Oct 1998 09:19:42 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id FAA26648; Thu, 15 Oct 1998 05:08:37 -0400 (EDT) Resent-Date: Thu, 15 Oct 1998 05:08:24 -0400 (EDT) Message-ID: <19981015121103.A20207@kappa.ro> Date: Thu, 15 Oct 1998 12:11:03 +0300 From: Mircea Damian To: Roland Jesse , ZSH Users Subject: Re: clear terminal after display of less, <, and apropos References: <19981014233316.A613@cs.uni-magdeburg.de> <981014182516.ZM20780@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <981014182516.ZM20780@candle.brasslantern.com>; from Bart Schaefer on Wed, Oct 14, 1998 at 06:25:16PM -0700 X-Operating-System: Linux secu 2.0.33 Resent-Message-ID: <"femNR2.0.-V6.8kR9s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1870 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Wed, Oct 14, 1998 at 06:25:16PM -0700, Bart Schaefer wrote: > On Oct 14, 11:33pm, Roland Jesse wrote: > } Subject: clear terminal after display of less, <, and apropos > } > } Whenever I display some information with '< blurb' the terminal gets > } cleared immediately after I quit the pager (more). The same happens after > } executing an 'apropos' command. > > This is a termcap thing. Often the "start visual mode" sequence in the > termcap will include a "switch to alternate screen" escape code; this > is often true for xterm. Programs like vi (and clones), more, and less > may read this sequence from the termcap and send it to the terminal > before they begin display. The "end visual mode" sequence then switches > back to the original screen. This is to avoid having your scrollback > buffer filled up with the output from the pager program, but it is > sometimes annoying. You can try setting TERM to a more primitive type > (say, vt100 instead of xterm) to prevent it from happening: > > % TERM=vt100 apropos intro > > You can change TERM permanently: > > [[ "$TERM" == xterm* ]] && TERM=vt100 > > Or you can alias specific commands to use the primitive terminal type: > > [[ "$TERM" == xterm* ]] && { > alias less='TERM=vt100 less' > alias more='TERM=vt100 more' > alias apropos='TERM=vt100 apropos' > alias man='TERM=vt100 man' > } This may be a terminfo "problem" too. If you are using an xterm then you can use it's option titeInhibit by adding it to your Xresources file(which btw I never managed to make it work even if the option is documented in xterm's man page.. hints?). The other way which I use is to hack a bit the termcap/terminfo files by removing those entries(ti,te in termcap and smcup, rmcup in terminfo). > > (That won't help with '< blurb' because READNULLCMD has to be a single > word. So you can also do (after creating the above aliases): > > function readnullcmd { less $* } > READNULLCMD=readnullcmd > > to get the terminal setting there as well.) > > Or you can read up on termcap and terminfo and figure out how to create > a new description for your terminal that omits the start/end visual mode > sequences. > > } The situation is a bit different for less: > } > } j.wh4-422 ~ % less blurb > } zsh: command not found: lesspipe.sh You have LESSOPEN defined as "|lesspipe.sh %s" and the shell file is not in your search PATH or is not available at all. Try removing this variable from your startup files or better(if you want to open tar, gz,zip files with less) add this script to your exec path. -- Mircea Damian Network Manager dmircea@roedu.net, dmircea@lbi.ro, dmircea@kappa.ro MD65-RIPE, MD2225, MD1-6BONE Phone: +40-1-4115246