POW ZSH and Environment Variables (.zshrc vs. .zshenv)

If you are setting environment variables like export SITE=’awesome site’ or export PATH=/Users/steveswedler/.rbenv/shims:/Users/steveswedler/.rbenv/bin:$PATH in your .zshrc file, those variables will not be available to POW. The reason is that the .zshrc file is only loaded for interactive sessions, like when you open a terminal window. Move the necessary lines to a .zshenv file (create it if you have to) and magically, those variables will be available to POW.

Standard advice found through Google searching is to put those lines in your .powconfig file. This might work for you if you don’t want them available anywhere else, but if you need them shared (like PATH variables) .zshenv is the way to go.

I’m still a zsh noob with a lot to learn, but I hope this saves someone some trouble.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.