From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29474 invoked by alias); 7 Sep 2014 21:01:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33127 Received: (qmail 29458 invoked from network); 7 Sep 2014 21:01:37 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140907140122.ZM12385@torch.brasslantern.com> Date: Sun, 07 Sep 2014 14:01:22 -0700 In-reply-to: <20140907214005.3190037b@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: The default $fpath" (Sep 7, 9:40pm) References: <540AF773.5080407@linux.intel.com> <20140906194513.5b19931c@pws-pc.ntlworld.com> <8761h05zvt.fsf@ft.bewatermyfriend.org> <20140907000454.74cda356@pws-pc.ntlworld.com> <140906204405.ZM18404@torch.brasslantern.com> <20140907193139.3bf3d3dc@pws-pc.ntlworld.com> <1410119582.2513.51.camel@tkkaskin-mobl3.ger.corp.intel.com.tanuk.dy.fi> <20140907214005.3190037b@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: The default $fpath MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Sep 7, 9:40pm, Peter Stephenson wrote: } } You can already set fpath the way you want in an initialisation file. Exactly. } The proposal is simply to provide a directory where there's some } reasonable chance it will be found by all installations of the shell on } the same system regardless of configuration. Actually, I think the proposal is to provide a directory where all OTHER softwares' configuration systems can install shell functions so that they are found by all installations of zsh on ANY system, regardless of the local-zsh-builder's and/or system-zsh-packager's idea of the path to the functions provided by zsh itself. } [...] If this builtin default becomes configurable } to use different directories the whole advantage is lost; it's far better } to use common run-time code to ensure a non-default directory. This point, however, holds true either way. I just think it's impossible to promise that the directory will exist; certainly the zsh installer should not unilaterally create it. } I'd really like to know if there are any problems caused by *this* } proposal, adding /usr/local/share/zsh/site-functions to the compiled-in } path. I can't think of any; presumably the configure-time (?) code for this would resemble if [ X$ac_default_prefix != X/usr/local ] then fixed_sitefndir=/usr/local/zsh/site-functions elif [ X$tzsh_name != Xzsh ] then fixed_sitefndir=/usr/local/zsh/site-functions else fixed_sitefndir='' fi and then zsh.mdd would use something like echo '#define FIXED_FPATH_DIR "'$(fixed_sitefndir)'"' >> zshpaths.h.tmp; and finally somewhere in Src/init.c the fpath would be prefixed with the value of FIXED_FPATH_DIR if it is non-empty. The worst that happens is that /usr/local is a remote file system (which would seem rather unlikely) and zsh gets slowed down every time fpath is searched for a directory there that doesn't exist.