How to get .zshrc to run in its entirety every time I open zsh

command lineitermzsh

Here is the entirety of my .zshrc.

alias ll='ls -l'
export HOME='/Users/rcorty/Dropbox'

This file is at /Users/myname/.zshrc.

When I start iTerm2, I check whether the home directory was reset by entering ls ~ and I recognize the files in my Dropbox — success! Then I enter ll and I am met with zsh: command not found: ll.

Weird. Then I run source /Users/myname/.zshrc. Now I do the same two checks and they both succeed (HOME is Dropbox and ll is ls -l.

I'm rather novice with shells in general and zsh in particular. From my reading of the zsh documentation, it seems like .zshrc should essentially be "sourced" each time I start a shell.

Where have I gone wrong?

Best Answer

Okay, it's working now. /Users/myname/.zshrc is:

export HOME='/Users/rcorty/Dropbox'

and /Users/myname/Dropbox/.zshrc is:

alias ll='ls -l'