purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.43k stars 82 forks source link

Setting zsh path array no longer works #37

Closed belak closed 10 months ago

belak commented 8 years ago

This snippet of code worked before (in my zshrc), but now it doesn't appear to grab the path updates correctly now that it's in zshenv. Note that if I echo $PATH right after setting path in my zshenv, it shows the correct value: /home/belak/bin:/home/belak/go/bin:/home/belak/.rbenv/shims:/home/belak/.rbenv/bin:/home/belak/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin

# Automatically remove duplicates from these arrays
typeset -U path cdpath fpath manpath

# Golang stuff
export GOPATH=$HOME/go

# Add our custom stuff
fpath=("$HOME/.belak/zsh" $fpath)
path=("$HOME/bin" "$GOPATH/bin" "$HOME/.rbenv/shims" "$HOME/.rbenv/bin" "$HOME/.local/bin" $path)
purcell commented 8 years ago

path is not the same as $PATH, I think.

dieggsy commented 7 years ago

This is really old, but I'm pretty sure path and PATH are the same - when you change one, the other changes to match it. One is just an array version of the other. I'm not entirely sure how it works beyond that.

nbraud commented 7 years ago

It uses the same mechanism as typeset -T. Cf http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html

purcell commented 10 months ago

Closing because this is a shell configuration issue, not an exec-path-from-shell issue specifically.