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

Re: PATH reordered when running zsh inside screen on Mac OS X Mountain Lion and MacPorts

On 2013-01-28 at 11:08 +0100, Nikolai Weibull wrote:
> I figured out what the problem was.  /etc/zshenv on Mac OS X Mountain
> Lion calls a utility called path_helper.  I for some reason only
> checked /etc/profile.  I don’t quite see why MacPort’s zsh checks
> /etc/zshenv instead of /opt/local/etc/zshenv (is this hard coded
> behavior in Zsh?),

No, that's controlled at build configure time by --enable-etcdir and
then each individual global config file can also have its path overriden
to be different.  However, the default is to use /etc/ instead of
$prefix/etc -- presumably because config files for shell start-up have
always been in /etc.

While MacPorts might override it, note that MacOS ships with an older
version of zsh, so using two different config files creates issues.
There's not a "clearly right" answer, "different config" or "same
config" have their pros and cons, but for people trying to minimize the
impact on administrators of users switching shells, with files in /etc/
being maintained by a config management system, using the same files for
the MacPorts build is IMO least likely to cause backlash that gets the
MacPorts version forcibly uninstalled after someone has spent too long
debugging an end-user complaint.


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