zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Roland Jesse <jesse@prinz-atm.CS.Uni-Magdeburg.De>,
	ZSH Users <zsh-users@math.gatech.edu>
Subject: Re: clear terminal after display of less, <, and apropos
Date: Wed, 14 Oct 1998 18:25:16 -0700	[thread overview]
Message-ID: <981014182516.ZM20780@candle.brasslantern.com> (raw)
In-Reply-To: <19981014233316.A613@cs.uni-magdeburg.de>

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


  reply	other threads:[~1998-10-15  1:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-14 21:33 Roland Jesse
1998-10-15  1:25 ` Bart Schaefer [this message]
1998-10-15  2:22   ` Geoff Wing
1998-10-15  9:11   ` Mircea Damian
1998-10-15 13:22     ` Paul Lew
1998-10-15 14:46       ` Zoltan Hidvegi
1998-10-15 18:09       ` Bart Schaefer
1998-10-15 19:29         ` Bart Schaefer
1998-12-15  2:08         ` problem with prompt Brian Harvell
1998-12-15  3:50           ` Bart Schaefer
1998-10-15 14:58     ` clear terminal after display of less, <, and apropos Greg Badros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=981014182516.ZM20780@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=jesse@prinz-atm.CS.Uni-Magdeburg.De \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).