From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13981 invoked by alias); 27 Jul 2013 00:10:57 -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: 31587 Received: (qmail 1325 invoked from network); 27 Jul 2013 00:10:40 -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 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130726171014.ZM8323@torch.brasslantern.com> Date: Fri, 26 Jul 2013 17:10:14 -0700 In-reply-to: <20130726184101.GE6421@WST420> Comments: In reply to William Giokas <1007380@gmail.com> "Re: [wgiokas@WST420: Re: Correct installation path for completion files]" (Jul 26, 1:41pm) References: <20130726180739.GD6421@WST420> <87d2q5goz9.fsf@ft.bewatermyfriend.org> <20130726184101.GE6421@WST420> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: William Giokas <1007380@gmail.com> Subject: Re: [wgiokas@WST420: Re: Correct installation path for completion files] Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 26, 1:41pm, William Giokas wrote: } Subject: Re: [wgiokas@WST420: Re: Correct installation path for completion } } } On Fri, Jul 26, 2013 at 08:23:06PM +0200, Frank Terbeck wrote: } > William Giokas wrote: } > } > It's hard to make it distribution-agnostic. The best way I can think of } > is to use the output of this as the destination directory: } > } > zsh -fc 'print ${fpath[1]}' } } If vendor-functions is something special that distributions use, then } they can specify that when they package this stuff. site-functions seems } to be the default for zsh, so it seems that it should be the default for } packages that install zsh completion. Even if you choose site-functions you still need to know what path the distribution has used as the prefix ... you've already pointed out that RedHat-derived dists have /usr/share/zsh/site-functions/ whereas Debian uses /usr/local/share/zsh/site-functions/. Frank's suggestion of running zsh to grab the first directory in $fpath is as good a way to avoid the guesswork as any. If zsh won't run because it's not installed, you're no worse off (and you can decide to skip the function installation entirely).