Preventing screen redraw when "more" exits

In previous releases of AIX (<5.3) the "more" command didn't redraw the screen upon exit. This helped when searching in a text document or man page because one could look for the relevant part of it, exit and use the left-over at the screen as reference for typing the next command.

Alas, this behaviour has changed: upon exiting "more" the screen is restored to what it was before invoking "more", thereby erasing exactly the information one was looking for. I was searching for a remedy and found out the following:

"more" is configured by an environment variable "MORE", which can be set - depending on which scope it should have - in "/etc/environment", one users ".kshrc" script or at the command line. Add/execute the following line:

MORE="-W notite" ; export MORE

(In "/etc/environment" you don't need the "export")

Now, if one knows how to accomplish the same for the exit of "vi" (or "view") I'd be glad to hear the solution.

I hope this helps.

bakunin

This happened to me when we upgraded from 5.3 to 6.1. If you are using xterm emulation, change your env var TERM from xterm to xterm-r5. To learn more about this subject, look up "alternative screen" and xterm FAQ.

1 Like

Many thanks for this info, i wasn't aware of that. I tried it and it worked well.

bakunin