Prevent terminal/screen refresh after using "man" or "vi" - Questions

This is a discussion on Prevent terminal/screen refresh after using "man" or "vi" - Questions ; On solaris (at least on 2.6), when you are logged on a terminal and you call
up a man page, or edit a file in vi, when you quit vi or the man page,
previous screen contents is not restored, ...

Prevent terminal/screen refresh after using "man" or "vi"

On solaris (at least on 2.6), when you are logged on a terminal and you call
up a man page, or edit a file in vi, when you quit vi or the man page,
previous screen contents is not restored, that is, the part of the man page
you were viewing or the file you were editing is displayed on the pterminal
with a shell prompt in the bottom.

On linux, what happens is that what was on the screen previously is
restored. This annoys me, sometimes I want to call a man page and leave part
of it displayed so I can copy and paste a command or "remember" what I've
just read. Otherwise, it "disapears" as soon as I quit.

I know I could use a GUI or start 2 ssh sessions, but it's a pain.

There must be a way to change this behavior ?

Thanks a lot !

I

Re: Prevent terminal/screen refresh after using "man" or "vi"

In article , G Dahler wrote:
>On solaris (at least on 2.6), when you are logged on a terminal and you call
>up a man page, or edit a file in vi, when you quit vi or the man page,
>previous screen contents is not restored, that is, the part of the man page
>you were viewing or the file you were editing is displayed on the pterminal
>with a shell prompt in the bottom.

Yes, but that's an environment setting, not a function of the O/S.
>On linux, what happens is that what was on the screen previously is
>restored. This annoys me, sometimes I want to call a man page and leave part
>of it displayed so I can copy and paste a command or "remember" what I've
>just read. Otherwise, it "disapears" as soon as I quit.

Yeah, I know what you are talking about - and I can't find it in the bash
man page. Your 'man' command is probably using '/bin/less' as a pager, and
you can call 'less' with the -X option to prevent screen restoration.

Try posting to a real newsgroup (comp.os.linux.questions is a bogus group
that is not carried by many news servers), like comp.os.linux.misc or
possibly comp.unix.shell and see if you can find someone who remembers what
the environmental variable is. Also, identify which distribution you are
using, and which vi clone (the real vi is not distributed outside of
commercial Unix).

Old guy

Re: Prevent terminal/screen refresh after using "man" or "vi"

On Wed, 12 Jan 2005 11:03:33 -0500, G Dahler wrote:
> On solaris (at least on 2.6), when you are logged on a terminal and you call
> up a man page, or edit a file in vi, when you quit vi or the man page,
> previous screen contents is not restored, that is, the part of the man page
> you were viewing or the file you were editing is displayed on the pterminal
> with a shell prompt in the bottom.
>
> On linux, what happens is that what was on the screen previously is
> restored. This annoys me, sometimes I want to call a man page and leave part
> of it displayed so I can copy and paste a command or "remember" what I've
> just read. Otherwise, it "disapears" as soon as I quit.
>
> I know I could use a GUI or start 2 ssh sessions, but it's a pain.
>
> There must be a way to change this behavior ?

--
Thomas D. Shepard
I am sorry, but you can't email me.ImaSpammer@spam.sux is not a real email address. I figure if someone wants to
harvest an email address to use for sending spam, they may as well use this one.

Re: Prevent terminal/screen refresh after using "man" or "vi"

Hi all,

I remember this feature was annoying me when I was using Solaris.
Working on Debian now I use

Code:

export TERM=linux

to prevent screen refresh after man or vi.
Or

Code:

export TERM=xterm

if I do wish to have my screen refreshed.
Should work for Solaris as well. Good luck!