ZSH not using exports found in .zshrc

93 views
Skip to first unread message

Stuart Weir

unread,
Jun 3, 2015, 9:29:55 PM6/3/15
to golan...@googlegroups.com
Hey guys,

I've been in conversation over twitter with Dave Cheney about how to set up go (I had it set up fine on my old machine) and zsh doesn't seem to be picking up the GOPATH and PATH in my .zshrc file. 

This is what I have in my zshrc for Go:

# set Golang working directory
export GOPATH=/Users/Stuart/go
export PATH=$PATH:$GOPATH/bin

if I do a manual "export PATH=$PATH:/usr/local/go/bin" from the zsh command line, when I run "which go", it will show me the PATH (/usr/local/go/bin/go).

If I switch to bash and run "which go", nothing prints out at all unless once again, I do a manual export.

Does anyone have any ideas?

Thank you in advance!

-Stu.

Lars Seipel

unread,
Jun 3, 2015, 10:45:26 PM6/3/15
to Stuart Weir, golan...@googlegroups.com
On Wed, Jun 03, 2015 at 04:36:11PM -0700, Stuart Weir wrote:
> I've been in conversation over twitter with Dave Cheney about how to set up
> go (I had it set up fine on my old machine) and zsh doesn't seem to be
> picking up the GOPATH and PATH in my .zshrc file.

That's not really a Go-specific problem. You should probably read the
startup files section[1] in the ZSH manual. There are more and zshrc
isn't necessarily the best place for setting up environment variables.
If you have any non-standard "configuration kits" installed, you should
refer to their documentation, too. Some might expect you to put your
customization in a different place.

[1] http://zsh.sourceforge.net/Doc/Release/Files.html
Reply all
Reply to author
Forward
0 new messages