Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 1998 08:03:33 -0800 (PST)
From:      Randy Bush <randy@psg.com>
To:        "José Mª Alcaide" <jose@we.lc.ehu.es>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: screen not restored on exit of (less|more|vi|.*)
Message-ID:  <m0zaMS5-0008G3C@rip.psg.com>
References:  <m0zaC2Y-0008G3C@rip.psg.com> <363DC146.67C421D8@we.lc.ehu.es>

next in thread | previous in thread | raw e-mail | index | archive | help
>> xserver on CURRENT, two xterms, each running current bash etc.
>>   o one to a bsdi 3.1 system (same on sunos, ...)
>>   o one to the same freebsd host
>> 
>> say 'less foo' (or vi foo, or ...)
>> 
>>   o quit less on bsdi and the screen is restored.  i.e., you see
>> 
>>     foo% more iddd.patch
>>     foo%
>> 
>>     i.e. all the remnants of less's output are gone, and the screen is
>>     restored exactly as it was before the command ran, with a new prompt
>>     right below the one that issued the command, even if it is mid-screen.
>> 
>>   o after running less on freebsd the screen is not restored.  i.e. the
>>     remnants of less fill the screen with the new prompt on the bottom
>>     line of the xterm, and the previous prompt and screen obliterated.
>> 
>> i prefer the former behavior, but do not understand how to cause the freebsd
>> system to adopt it.
> 
> You should substitute the contents of the file
> /usr/X11R6/lib/X11/etc/xterm.termcap for the xterm entries in
> /usr/share/misc/termcap. Once done, run "cap_mkdb" to rebuild
> the termcap.db database. This works for me. NOTE: The xterm.termcap
> file distributed with XFree86 3.3.2 has a little bug: search for
> the string "39m;49m" and change it to "39;49m".

YESSSSSSSSSSSSSSSSS!!!!!

> However, there is a nasty secondary effect with "more": when you reach
> the end of a file, "more" terminates, and the contents of the
> last screen is lost. This effect can be avoided using the "-e"
> option or, still better, defining the environment variable "MORE=-e".

yes yes.  i actually use less with

    LESS=-aCeiM -P %i/%m %f %lt/%L %pb\%

THANK YOU!

randy

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0zaMS5-0008G3C>