Any suggestions? I have neither MANPAGER nor PAGER explicitly set in my
shell.
--
Rahul
Then export PAGER=more; it must have defaulted to less.
>
> Then export PAGER=more; it must have defaulted to less.
>
Thanks Dave! That solved it. I didn't realize that this was a more vs less
issue!
--
Rahul
There is an option to less (keep it in $LESS) that changes this
behaviour. Check the man page; I forget which option it is.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
>Dave Uhring <daveu...@yahoo.com> wrote
>> Then export PAGER=more; it must have defaulted to less.
>
>Thanks Dave! That solved it. I didn't realize that this was a more vs
>less issue!
It isn't. It's a terminal initialization function, and is further
dependent upon how your version of less is configured. Find some
document, and display it with
less document
When you exit, the screen will be redrawn back to the way it was, and
paged output of less will be gone. Then try
less -X document
The '-X' is detailed in the man page:
-X Disables sending the termcap initialization and deinitial-
ization strings to the terminal. This is sometimes desir-
able if the deinitialization string does something unneces-
sary, like clearing the screen.
Notice the last sentence. If you only want this behavior to occur when
reading man pages, reset the PAGER variable in /etc/man.conf appropriately.
If you want the behavior to be global to your user, set the LESS variable
in your shell login script.
LESS='-X'; export LESS
but read the 'less' man page under the 'OPTIONS' section to see how such
options are parsed. In theory, you can also screw with the termcap
settings, but it's probably not worth the hassle.
Old guy
> -X Disables sending the termcap initialization and deinitial-
> ization strings to the terminal. This is sometimes desir-
> able if the deinitialization string does something unneces-
> sary, like clearing the screen.
>
> Notice the last sentence. If you only want this behavior to occur
> when reading man pages, reset the PAGER variable in /etc/man.conf
> appropriately. If you want the behavior to be global to your user, set
> the LESS variable in your shell login script.
>
> LESS='-X'; export LESS
Ah! Now I understand. -X is the behavior I always wanted with less. I
had seen the -X option in the manpage before. But I never connected that
sentence to the effect it produces. Thanks Moe!
--
Rahul