From: Utkarsh Singh Date: Mon, 5 Apr 2021 16:09:41 +0000 (+0200) Subject: Fix cd to directories called "eshell" in eshell X-Git-Tag: emacs-28.0.90~2999 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d2edc29db6278deb20bc04c878757eeee2029086;p=emacs.git 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 --- 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