Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _man only uses $manpath



Adam Spiers wrote:
> 
> No, the GNU man displays all the man paths it will use if invoked as
> `man -w':

It seems that GNU man itself varies. The GNU man on the debian linux
system I have access to at work prints:
What manual page do you want?
in response to -w with no argument and has no -W option. Note that it
does return an exit code of 1 though so we can still use man -w if we
check the exit code. 

> In the GNU case, you can just grep /etc/man.config for `^MANPATH '.

That must be specific to your linux distribution as opposed to GNU man.

> I'd rather keep guessing as a last resort.  Maybe try man -w and check
> the exit code, then
>   if [[ -r /etc/man.config ]]; then

That's probably the best approach as long as we don't find a system that
breaks it.

Oliver Kiddle



Messages sorted by: Reverse Date, Date, Thread, Author