Se o nome do arquivo não contiver um /
, o comando interno source
poderá procurar o nome no PATH
, dependendo de algumas opções do shell. Então, em vez de source .bashrc
,
'source ./.bashrc'
deve fazer o que quiser.
De man bash
:
. filename [arguments]
source filename [arguments]
Read and execute commands from filename in the current shell
environment and return the exit status of the last command exe‐
cuted from filename. If filename does not contain a slash,
filenames in PATH are used to find the directory containing
filename. The file searched for in PATH need not be exe‐
cutable. When bash is not in posix mode, the current directory
is searched if no file is found in PATH. If the sourcepath
option to the shopt builtin command is turned off, the PATH is
not searched.