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

Re: The default $fpath



On Sat, 06 Sep 2014 15:00:51 +0300
Tanu Kaskinen <tanu.kaskinen@xxxxxxxxxxxxxxx> wrote:
> Would a patch be accepted that adds /usr/local/share/zsh/site-functions 
> to $fpath always, no matter what the install prefix is?

It is a bit frustrating that there's nowhere you can put a function and
guarantee that a user will find it without altering the path.  Granted
you *can* put it somewhere else where it'll be found, that doesn't mean
you should be forced to, if there are no gotchas to do with having a
standard location.

I'm not sure what the disadvantage would be, if any.  The best I can
come up with is that if there is an actual installation in /usr/local it
might have a version of a function that's incompatible with the standard
system version.  I'm not sure how likely this would be with user-defined
as opposed to distributed functions, though, since if you consciously
decide to put something in /usr/local you can decide to put a different
version under /usr (or wherever), too.  But quite possibly people
writing distributions sometimes interpret "site" to mean "distribution".
Even so, you could put the directory at the end of the fpath so it only
finds it if it didn't find it anywhere else.  But maybe you meant it to
be a replacement for a distributed function... sigh.

Discuss.

pws



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