]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix cd to directories called "eshell" in eshell
authorUtkarsh Singh <utkarsh190601@gmail.com>
Mon, 5 Apr 2021 16:09:41 +0000 (18:09 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 5 Apr 2021 16:09:41 +0000 (18:09 +0200)
* 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

index 658ea085c95a4f405309fe644d46d52b285ead96..1f08e89191942b99c2975a3bf61275322d2de58f 100644 (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