or run:<br><br>LESS='-X' man foo<br><br><br>or set up an alias:<br><br>alias man="LESS='-X' man"<br><br>Nice trick. wish I'd seen this a LONG time ago!<br><br><div class="gmail_quote">On Mon, Jul 19, 2010 at 1:25 PM, Michael B. Trausch <span dir="ltr"><<a href="mailto:mike@trausch.us">mike@trausch.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Mon, 2010-07-19 at 10:39 -0400, Scott McBrien wrote:<br>
> It's a less option to not clear the screen on exit.<br>
><br>
> There is a less variable that contains commandline arguments for less.<br>
> I don't remember the option off the top of my head, but it is in the<br>
> less man page, as is the variable that holds the less arguments.<br>
> Something like:<br>
> export LESS_OPTS="-c"<br>
><br>
> But again, check the man page for both variable name and command opt.<br>
<br>
</div>As <a href="mailto:rs@ale.spam.futz.org">rs@ale.spam.futz.org</a> pointed out, use the LESS shell variable to<br>
control the behavior of the less pager. To make it all explicit, I'd do<br>
the following in your shell's startup script:<br>
<br>
MANPAGER=less<br>
LESS='-X'<br>
<br>
export MANPAGER LESS<br>
<br>
Then all your shell sessions will have the same behavior.<br>
<br>
What I don't know is whether or not there will be any side effects, the<br>
man page says this:<br>
<br>
-X or --no-init<br>
Disables sending the termcap initialization and deini-<br>
<div class="im"> tialization strings to the terminal. This is sometimes<br>
desirable if the deinitialization string does something<br>
unnecessary, like clearing the screen.<br>
<br>
</div>It would seem to me like this could mean that you may occasionally have<br>
terminal states that less won't be able to deal with; you might have to<br>
use the reset(1) command to make things work properly in such an event.<br>
<br>
--- Mike<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br>I would rather stumble along in freedom than walk effortlessly in chains.<br><br><br>