[PATCH] man: use less as default pager and parse DEFINE lines defining pager
John Spencer
maillist-busybox at barfooze.de
Sun Jun 2 12:06:03 UTC 2013
On 06/02/2013 12:51 PM, 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>
>
++ const char* env_pager = getenv("MANPAGER");
++ if (!env_pager) env_pager = getenv("PAGER");
maybe one could optimize this to
const char* env_pager = getenv("MANPAGER");
if (!env_pager) env_pager = getenv("MANPAGER"+3);
so that 5 bytes are saved because the string is reused.
More information about the busybox
mailing list