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

Re: ISP OS upgrade = zsh function-files not found



On 2009-03-26 at 02:09 -0400, rj wrote:
> I use zsh-4.3.9 on 2 ISPs: one is a NetBSD, the other FreeBSD.  The FreeBSD
> just ugraded to FreeBSD 7.1-RELEASE #0, and, in doing so, from zsh-4.3.4 to
> 4.3.9.

> In .zshrc I have:
> 
> 171 # where to look for autoloaded function definitions:
> 172 fpath=(/usr/local/share/zsh/4.3.9/functions $HOME/.zfunc)

> But that FreeBSD zsh function-defs directory,
> /usr/local/share/zsh/4.3.9/functions, looks like this:

> In other words, it has subdirs in it.  Should it?  The functions dir on the
> NetBSD system has no subdirs, just a long long list of individual
> function-def files.  Do I need to tell the sysadmin to break out all the
> subdirs into individual files?  If not, what do I need to do? Thanks.

It's a zsh configure-time option, --enable-function-subdirs, which the
FreeBSD port sets; that went in at:
  http://www.freebsd.org/cgi/cvsweb.cgi/ports/shells/zsh/Makefile.diff?r1=1.58;r2=1.59
ie, some years ago; the zsh-devel port was up until 4.1.1, so also went
some time ago.

What I tend to do is make $fpath unique and then just shove stuff into
it, so that I preserve the existing built-in default and don't need to
worry that repeated calls will extend $fpath.  So:

  typeset -U fpath
  fpath=(/earlier/stuff $fpath /later/stuff)

or for you, it could just be:

  typeset -U fpath
  fpath+=(~/.zfunc)

If you want to stick with specifying it manually, then:

  fpath=(
    /usr/local/share/zsh/site-functions
    /usr/local/share/zsh/$ZSH_VERSION/functions{,**/*(N/)}
    ~/.zfunc
    )

Regards,
-Phil



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