O comando .
procura o arquivo no seu $path
, ele não procura por padrão no diretório atual. É por isso que funciona quando você dá o caminho absoluto ( "$(pwd)"/.zshrc
).
Do manual do zsh sobre o comando .
:
. file [ arg ... ]
Read commands from file and execute them in the current shell environment.
If file does not contain a slash, or if PATH_DIRS is set, the shell looks in the components of $path to find the directory containing file. Files in the current directory are not read unless ‘.’ appears somewhere in $path.
...
Compare com o source
command :
source file [ arg ... ]
Same as ‘.’, except that the current directory is always searched and is always searched first, before directories in $path.