From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13706 invoked by alias); 13 Mar 2015 22:47:12 -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: 20007 Received: (qmail 22524 invoked from network); 13 Mar 2015 22:47:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Fri, 13 Mar 2015 23:41:21 +0100 From: Roman Neuhauser To: zsh-users@zsh.org Subject: fndir introspection, site-packages documentation Message-ID: <20150313224121.GO4524@isis.sigpipe.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) hello, is there a way to get at the value "fndir" ended up having in configure? this would be useful in function packaging. i know /usr/local/share/zsh/site-functions is always used (had to dig, it's not documented!) but that is not going to please Linux distros, which generally use --prefix=/usr. i would like to be able to do something like sitefndir=$(zsh -c 'print "$ZSHSITEFNDIR"') a simple Makefile should be able to do the right thing on any operating system or exotic configuration without user intervention (in this case). apropos! there's a *single* occurrence of "site-functions" in zshall(1), a passing reference coming from the zsh/newuser description in zshmodules(1) of all places: If none of the start-up files were found, the module then looks for the file newuser first in a sitewide directory, usually the parent directory of the site-functions directory, and if that is not found the module searches [...] the configure-time fndir should be mentioned in the $fpath/$FPATH description in zshparam(1), and this bullet from NEWS absolutely needs to be there as well: - The default $fpath/$FPATH is now designed always to include /usr/local/share/zsh/site-functions. This directory does not need to exist. Sites that set an explicit site directory can put that in /etc/zshenv as before. The intention of the new path element is to increase the likelihood that locally added functions can be found with the shell running "out of the box", no matter how the shell was configured. -- roman