From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3226 invoked by alias); 6 Aug 2017 09:55:01 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22792 Received: (qmail 25317 invoked by uid 1010); 6 Aug 2017 09:55:00 -0000 X-Qmail-Scanner-Diagnostics: from forward1h.cmail.yandex.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(87.250.230.16):SA:0(-0.7/5.0):. Processed in 4.10987 secs); 06 Aug 2017 09:55:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: kp-pav@yandex.ru X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1502012909; bh=T5yPDp++b8Y975nm7QxaZzo2rzp5/Cbrkxi8LLIiJMQ=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=Ru3lQf1xIp5jtUjEzRk/4BjKpMJ7gqgso0cXQQJcQWaObvpXYXG/c7y+4DnJ+Jl5J mlROqn5Inxd5j+DXBqJoWy4pjHUiPoXrN+JT30LU2H1QNNwPFFhblZ2ffXPqgZ7TgD P4bte6Tb+VMA3z30ZAXl66bZgl7rBqp8pwNiZNxI= Authentication-Results: mxback2o.mail.yandex.net; dkim=pass header.i=@yandex.ru From: "Nikolay Aleksandrovich Pavlov (ZyX)" To: "linuxtechguy@gmail.com" , "zsh-users@zsh.org" In-Reply-To: References: <76131501981203@web60g.yandex.ru> Subject: Re: Does mandir get saved some place? MIME-Version: 1.0 Message-Id: <1603101502012908@web54j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sun, 06 Aug 2017 12:48:28 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 06.08.2017, 09:40, "Jim" : > ---------- Forwarded message ---------- > From: Jim > Date: Sun, Aug 6, 2017 at 1:29 AM > Subject: Re: Does mandir get saved some place? > To: "Nikolay Aleksandrovich Pavlov (ZyX)" > > Forgot to change address to go the list. > > Nikolay, > > On Sat, Aug 5, 2017 at 8:00 PM, Nikolay Aleksandrovich Pavlov (ZyX) < > kp-pav@yandex.ru> wrote: > >>  03.08.2017, 18:03, "Jim" : >> >>  > With the fact that the configure script has the option "mandir=>  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 > what > I've seen, is if two versions are installed with the same prefix, the last > version > 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= when executing ./configure during > the build. This means they will be in a non-standard location and the > location > 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 > MANPATH. > > 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. > 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, > > Jim Wondering why do you install different zsh versions with one prefix? This would need some hacks like moving mandir you mentioned. For testing purposes I usually just compile with prefix `~/.local-${app}[-${app_version}]`, this way each application is installed into its own directory and additionally does not need superuser rights for installation or creating a package. For system-wide installations there is /opt which may be used for this purpose. Of course, if you need all zsh’s available at once you will need to remove `zsh` executable, keeping only `zsh-{version}` and modify $PATH, either in .zshrc or in some place like /etc/env.d. This variant is also more universal: not all software uses its version in its paths. Alternative is making “a unique path for each version” be computable based on `$ZSH_VERSION`, in any case even if new variable is created it will be only available in new zsh versions.