The function eshell-print has some weird behavior, as it only seems to work when called as a part of an eshell process. All other times it throws the error
wrong type arguments: arrayp, nil
Try to execute this function inside the scratch buffer:
(defun test () (eshell) (eshell-print "Hello world")) (test)
This doesn't run, even without an init file. If you try this, however, it works:
(progn (eshell) (eshell-return-to-prompt) (insert "test") (eshell-send-input))
Does anyone know why it exhibits this behavior?