#
222653 |
|
03-Jun-2011 |
ru |
When MANCOLOR environment variable is set, enable ANSI color escapes in grotty(1). This makes it possible to view colorized manpages in color.
When MANPAGER environment variable is set, use it instead of PAGER.
Why another environment variable, one might ask? With color output enabled, both a terminal and a pager should support the ANSI color escapes. On a supporting terminal, less(1) with option -R would be such a pager, while "more -s" (the current default pager for man(1)) will show garbage. It means a different default pager is needed when color output is enabled, but many people have PAGER set customary, and it's unlikely to support ANSI color escapes, so introducing yet another variable (MANPAGER) seemed like a good option to me:
- if MANPAGER is set, use that unconditionally;
- if you disable color support (it is by default), and don't set MANPAGER, you get an old behavior: -P pager, $PAGER, "more -s", in that order;
- if you enable color support (by setting MANCOLOR), and don't set MANPAGER, we ignore PAGER which is unlikely to support ANSI color escapes, and you get: -P pager, "less -Rs", in that order;
- you might have good reasons for different man(1) and general purpose pagers;
- later versions of GNU man(1) support MANPAGER.
|
#
222635 |
|
03-Jun-2011 |
ru |
Added support for the MANWIDTH environment variable:
If set to a numeric value, used as the width manpages should be displayed. Otherwise, if set to a special value ``tty'', and output is to a terminal, the pages may be displayed over the whole width of the screen.
|
#
213317 |
|
01-Oct-2010 |
gordon |
Implementaiton of man, manpath, whatis, and apropos written entirely in sh.
Features of this new version in favor of the old one: BSD licensed -- old one is GPL. Imports configuration from /etc/man.conf and LOCALBASE/etc/man.d/*.conf allowing ports to extend the base functionality. The pluggable configuration can supplement the manual search path (retiring use.perl), add locales, and override language specific toolsets (attempt to merge the japanese/man port into the base system as much as possible).
Much effort has been made to make this version mirror the functionality of the existing implementation. For 99% of users, it should be a drop in replacement.
PR: gnu/143271, gnu/4419 Reviewed by: dougb (previous versions) Approved by: wes (mentor)
|