Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: clear terminal after display of less, <, and apropos
- X-seq: zsh-users 1870
- From: Mircea Damian <dmircea@xxxxxxxxxxxxx>
- To: Roland Jesse <jesse@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>, ZSH Users <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: clear terminal after display of less, <, and apropos
- Date: Thu, 15 Oct 1998 12:11:03 +0300
- In-reply-to: <981014182516.ZM20780@xxxxxxxxxxxxxxxxxxxxxxx>; from Bart Schaefer on Wed, Oct 14, 1998 at 06:25:16PM -0700
- References: <19981014233316.A613@xxxxxxxxxxxxxxxxxxx> <981014182516.ZM20780@xxxxxxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxx, dmircea@xxxxxx, dmircea@xxxxxxxx
MD65-RIPE, MD2225, MD1-6BONE
Phone: +40-1-4115246
Messages sorted by:
Reverse Date,
Date,
Thread,
Author