I'm using [oh-my-zsh] in iTerm on MacBook running Mavericks.
I have iTerm set to source my .zsh file on load, and mostly that works.
cd && source .zsh
Except when it doesn't. Sometimes, even in the middle of a session, it will forget my environment vars and aliases. If that happens, even basic stuff like mvn
gets "forgotten."
I'm not sure if this is an issue with iTerm, zsh, or oh-my-zsh. Any thoughts?
Best Answer
According to the zsh user guide, aliases should be defined in
~/.zshrc
:It also has a tip for keeping your
~/.zshrc
clean:So, you might want to create a file called
~/.aliasrc
and source it (.
meanssource
) from your~/.zshrc
.The same source suggests that environmental variables should be in
~/.zshenv
: