From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4472 invoked from network); 15 Oct 1998 01:30:12 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 Oct 1998 01:30:12 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id VAA18167; Wed, 14 Oct 1998 21:22:31 -0400 (EDT) Resent-Date: Wed, 14 Oct 1998 21:22:02 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981014182516.ZM20780@candle.brasslantern.com> Date: Wed, 14 Oct 1998 18:25:16 -0700 In-Reply-To: <19981014233316.A613@cs.uni-magdeburg.de> Comments: In reply to Roland Jesse "clear terminal after display of less, <, and apropos" (Oct 14, 11:33pm) References: <19981014233316.A613@cs.uni-magdeburg.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Roland Jesse , ZSH Users Subject: Re: clear terminal after display of less, <, and apropos MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"yiB-b2.0.9R4.vuK9s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1868 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 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' } (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 It looks from that error as if "less" on your system is not an actual executable, but instead is some kind of a shell script. There's not much help we can give you in that case. Try: % whence -a less to see if there's already an alias or function causing your confusion. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com