zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ben Woods <woodsb02@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>, adamw@freebsd.org
Subject: Re: --enable-etcdir for multiple locations (similar to PATH)
Date: Thu, 23 Jun 2016 16:09:37 -0700	[thread overview]
Message-ID: <CAH+w=7Y7mXWfQodPuMTLhjXsSuU+ZQpVevTVPP0peynCz1kruQ@mail.gmail.com> (raw)
In-Reply-To: <CAOc73CDmw2uRuMReVoon-ncnPB-zqYi37x9T-wcqQZ_WdDccKw@mail.gmail.com>

On Thu, Jun 23, 2016 at 3:14 AM, Ben Woods <woodsb02@gmail.com> 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.


  reply	other threads:[~2016-06-23 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23 10:14 Ben Woods
2016-06-23 23:09 ` Bart Schaefer [this message]
2016-06-27  8:38   ` Ben Woods

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Y7mXWfQodPuMTLhjXsSuU+ZQpVevTVPP0peynCz1kruQ@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=adamw@freebsd.org \
    --cc=woodsb02@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).