Fix cd to directories called "eshell" in eshell

* lisp/eshell/em-script.el (eshell-script-initialize): Allow
changing directory to directories called "eshell" (bug#47547).

Copyright-paperwork-exempt: yes
This commit is contained in:
Utkarsh Singh 2021-04-05 18:09:41 +02:00 committed by Lars Ingebrigtsen
parent 81940e9c0e
commit d2edc29db6

View file

@ -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