[PATCH] man: use less as default pager and parse DEFINE lines defining pager
Tito
farmatito at tiscali.it
Sun Jun 2 11:48:03 UTC 2013
On Sunday 02 June 2013 12:51:21 John Spencer wrote:
> man.config can define lines such as
> DEFINE pager less -s
>
> this patch parses them, additionally it always sets pager to less
> instead of more.
>
> Signed-off-by: John Spencer <maillist-busybox at barfooze.de>
>
>
+ /* environment overrides setting from man.config */
+ const char* env_pager = getenv("MANPAGER");
+ if (!env_pager) env_pager = getenv("PAGER");
+ if (env_pager) pager = env_pager;
+ if (!pager) pager = "less";
Hi,
what if there is no less on the system?
Maybe we should check at config time that at least one
of the pagers (more, less) is enabled an use that as default
and eventually if both are enabled prefer less.
Just my 2 cents.
Ciao,
Tito
More information about the busybox
mailing list