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 Tue, Jan 29, 2013 at 7:21 AM, Lawrence Velázquez <larryv@xxxxxxxxxxxx> wrote:
> On Jan 28, 2013, at 5:08 AM, Nikolai Weibull <now@xxxxxxxx> wrote:

>> I figured out what the problem was.  /etc/zshenv on Mac OS X Mountain Lion calls a utility called path_helper.

> I agree that /etc/zprofile would be a better place to set ${PATH}, but you would still run into the issue because terminal multiplexers usually run login shells. I previously encountered it under tmux.

Not screen, not the way I have it configured, anyway.  Tmux seems to
force logged in terminals.  I guess one could check SHLVL or something
like that.

> The real problem is that /usr/libexec/path_helper alters ${PATH} even if ${PATH} already contains the entries it wants to add. In this case, it moves the entries to the beginning of ${PATH} instead of just leaving it as is.

Yes, precisely.

> The old zsh-devel port did use --enable-etcdir in its configure phase. For the reason given by Phil, I chose not to carry this over to the zsh port when I assumed maintenance of both and obsoleted zsh-devel.

Aha, that explains why it occured only recently.

Thank you for filling in the details!

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