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

Fwd: Does mandir get saved some place?

---------- Forwarded message ----------
From: Jim <linux.tech.guy@xxxxxxxxx>
Date: Sun, Aug 6, 2017 at 1:29 AM
Subject: Re: Does mandir get saved some place?
To: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@xxxxxxxxx>

Forgot to change address to go the list.


On Sat, Aug 5, 2017 at 8:00 PM, Nikolay Aleksandrovich Pavlov (ZyX) <
kp-pav@xxxxxxxxx> wrote:

> 03.08.2017, 18:03, "Jim" <linux.tech.guy@xxxxxxxxx>:
> > With the fact that the configure script has the option "mandir=<some
> dir>"
> > I assumed(bad thing to do) that there would be an easy way to discover
> > where the man pages were saved. If there is, so far I haven't found it.
> My
> > reasoning for this is, if I'm testing a particular build, I would like to
> > have
> > available the pages for that build if they exist. I assumed(I know)
> > that is why "mandir" is there, to make this possible.
> >
> > Is there a variable of something else that can be accessed to tell
> > someone where a particular zsh build saved the man pages? If not,
> > would it be unreasonable to ask that a variable like "mandir" be set with
> > the path to those man pages? This would make it so much easier to
> > set MANPATH. For me it would even be better if zsh automatically
> > added a path to them before the normal locations. I'm sure others
> > would disagree. An option allowing such behaviour would allow a user
> > to set this to meet there own needs.
> You can probably use `zsh -fc 'printf "%s" $module_path[1]:h:h:h/share/man'`.
> Should work fine as long as you are only setting single installation prefix
> based on which other locations are computed and not other installation
> locations explicitly. All versions I ever needed have `$module_path[1]` set
> to something like `{prefix}/lib(64)?/zsh/$ZSH_VERSION`, so three `:h` are
> there to get rid of `lib*`, `zsh` and `$ZSH_VERSION` components.

I had been playing around with something like that. It assumes that the man
pages go into the traditional locations of either /usr/share/man  or
/usr/local/share/man depending on the prefix.  The issue with this, from
I've seen, is if two versions are installed with the same prefix, the last
installed will overwrite the previous version's man pages.  Each version can
be given its on directory to store the man pages, by adding the option
--mandir=<a unique path for each version> when executing ./configure during
the build. This means they will be in a non-standard location and the
would have to be added to MANPATH. The result of using --mandir in this
way is the method used above will not give you the results you need to set

It would appear that unlike modules, which has the "module_path" variable,
there is no equivalent variable for mandir. If there is I haven't found it.
can be argued that zsh doesn't need to know where the man pages are
located. But the command "man" does, which means that zsh has to set
MANPATH correctly. It would simplify things if zsh could somehow return
this information.

Thanks for responding,


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