Subject: Re: --enable-etcdir for multiple locations (similar to PATH)
From: Ben Woods <[email-masked]>
To: Bart Schaefer <[email-masked]>
Cc: Zsh hackers list <[email-masked]>, [email-masked]
Date: Mon, 27 Jun 2016 10:38:01 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On 24 June 2016 at 01:09, Bart Schaefer <[email-masked]> wrote:

> On Thu, Jun 23, 2016 at 3:14 AM, Ben Woods <[email-masked]> wrote:
> >
> > I am wondering if it is possible to tell zsh to look in multiple
> different
> > locations for it's startup/shutdown configuration files?
>
> No, it's not.  We discussed this issue several (more like many) years
> ago and concluded that the number of different ways that zsh can find
> configuration files is already complicated enough, maybe even too
> complicated.
>
> > This is important, because in FreeBSD, configuration files for ports are
> > not supposed to be in /etc, but in /usr/local/etc. However, we are aware
> > that many people with read the official zsh documentation at the link
> below
> > and try to put the configuration files in /etc.
>
> The correct solution to this is for the port itself to supply the
> /usr/local/etc file containing something like e.g for
> /usr/local/etc/zshrc
>
> [[ -f /etc/zshrc && ! /etc/zshrc -ef /usr/local/etc/zshrc ]] && source
> /etc/zshrc
>
> Additional tests to prevent recursive "source"ing are possible but may
> be overkill.
>

Thanks for the reply Bart. The FreeBSD port has now been updated by adamw
to look for the config files in /usr/local/etc.
http://www.freshports.org/shells/zsh

Regards,
Ben

--
From: Benjamin Woods
[email-masked]