Just found this blog. Quote:
All commands evaluated by Eshell have an evaluation order, which is an ordered list your command must pass through to determine what part of Eshell handles it. If there is nothing on the list that wants to evaluate your command, you will be told your command is invalid.
So the problem is that the lisp source
function comes before the source
command. To fix this, we need to tell eshell
explicitly that we want to execute a shell command. And the answer is in this variable:
eshell-explicit-command-char (default is *)