* lisp/eshell/em-script.el (eshell-script-initialize): Allow
changing directory to directories called "eshell" (bug#47547).
Copyright-paperwork-exempt: yes
"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