From d2edc29db6278deb20bc04c878757eeee2029086 Mon Sep 17 00:00:00 2001 From: Utkarsh Singh Date: Mon, 5 Apr 2021 18:09:41 +0200 Subject: 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 --- lisp/eshell/em-script.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/eshell/em-script.el') 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 -- cgit v1.2.3