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

Re: path mangled in 4.3.9




On Sep 16, 2009, at 8:48 AM, Daniel Sproul wrote:

I am running Mac OS X 10.6.1 and the included zsh (version 4.3.9):

[bebop:~]% zsh --version
zsh 4.3.9 (i386-apple-darwin10.0)

I use .zprofile to set up my PATH, which works fine initially, but if I
fork another zsh process from inside zsh then my PATH gets reordered:

[bebop:~]% echo $PATH
/Users/sproul/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/ usr/local/bin:/usr/X11/bin:/usr/X11R6/bin
[bebop:~]% zsh
[bebop:~]% echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/ sproul/bin:/sw/bin:/sw/sbin:/usr/X11R6/bin

the problem appears to be zsh-specific, given that if I fork a bash
process my PATH gets properly exported:

[bebop:~]% echo $PATH
/Users/sproul/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/ usr/local/bin:/usr/X11/bin:/usr/X11R6/bin
[bebop:~]% bash
[bash]% echo $PATH
/Users/sproul/bin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/ usr/local/bin:/usr/X11/bin:/usr/X11R6/bin

The same thing happens to my MANPATH.

I do have the following line in my .zshrc, though commenting it out
doesn't seem to change anything:
typeset -U PATH MANPATH CDPATH FPATH

any thoughts?

thanks!
- daniel


Apple was kind enough to provide a new  /etc/zshenv that contains


# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
        eval `/usr/libexec/path_helper -s`
fi

Try

sudo mv /etc/zshenv /etc/zshenv.dist

and see if you now get the expected behavior.

Bill





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