Do you need to include export for environment variables in Bash profile / zshrc?
I'm using Z shell (Zsh) for my terminal and in my .zshrc
file I have the two lines:
varOne="foo"
export varTwo="bar"
When I echo either variable (ex: echo $varOne
) within the terminal, the correct value is output.
So is there a difference when prefixing the environment variable declaration with export
inside the .zshrc
file?