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 <[email protected]>
>
>
+ /* 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
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox