(setq args (eshell-stringify-list (eshell-flatten-list args)))
;; (if (file-remote-p default-directory)
;; (eshell-remote-command command args))
- (let ((interp (eshell-find-interpreter command)))
+ (let ((interp (eshell-find-interpreter
+ command
+ ;; Do not examine remote shell scripts.
+ (or (and (stringp command) (file-remote-p command))
+ (file-remote-p default-directory)))))
(cl-assert interp)
(if (functionp (car interp))
(apply (car interp) (append (cdr interp) args))