Discussion:
Prevent terminal/screen refresh after using "man" or "vi"
(too old to reply)
G Dahler
2005-01-12 16:03:33 UTC
Permalink
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
Moe Trin
2005-01-14 01:05:15 UTC
Permalink
Post by G Dahler
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.
Post by G Dahler
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
Thomas D. Shepard
2005-01-18 06:06:46 UTC
Permalink
Post by G Dahler
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 ?
I suggest you try using Emacs shell mode for interacting with the shell,
editing your plain text files, and reading man pages, (and viewing
directories, etc...).

Type M-X man to view a man page in a fully-functional editing buffer.
Post by G Dahler
Thanks a lot !
I
--
Thomas D. Shepard
I am sorry, but you can't email me.
***@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.
Loading...