summaryrefslogtreecommitdiff
path: root/lisp/eshell/em-script.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell/em-script.el')
-rw-r--r--lisp/eshell/em-script.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el
index 658ea085c95..1f08e891919 100644
--- a/lisp/eshell/em-script.el
+++ b/lisp/eshell/em-script.el
@@ -60,8 +60,9 @@ This includes when running `eshell-command'."
"Initialize the script parsing code."
(setq-local eshell-interpreter-alist
(cons (cons (lambda (file _args)
- (string= (file-name-nondirectory file)
- "eshell"))
+ (and (file-regular-p file)
+ (string= (file-name-nondirectory file)
+ "eshell")))
'eshell/source)
eshell-interpreter-alist))
(setq-local eshell-complex-commands