I recently switched from bash to zsh. In bash, I used the dot alias .
for the source command, e.g.
. .bashrc
It worked with . .bashrc
, . ~/.bashrc
, . ./.bashrc
.
However with zsh, the dot alias does not work in the same way. It only works with a path to the file. But not if I use a file without path:
This does not work:
. .zshrc
It would give me this error: .: no such file or directory: .zshrc
But these all work:
source .zshrc
. ./.zshrc
. ~/.zshrc