From 882370eaa4f7ad6a88396dfdc64f896c727f87f4 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 24 Dec 2014 09:52:18 +0100 Subject: [PATCH] eshell/esh-ext.el: Expand relative remote file names. Fixes: debbugs:18782 * eshell/esh-ext.el (eshell-find-interpreter): Expand relative remote file names. --- lisp/ChangeLog | 5 +++++ lisp/eshell/esh-ext.el | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0b93d7673f9..0882a519f86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-24 Michael Albinus + + * eshell/esh-ext.el (eshell-find-interpreter): Expand relative + remote file names. (Bug#18782) + 2014-12-23 Sam Steingold * shell.el (shell-display-buffer-actions): New user option. diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index 2654bf21e6a..d7fea47601c 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -296,6 +296,11 @@ line of the form #!." (let ((fullname (if (file-name-directory file) file (eshell-search-path file))) (suffixes eshell-binary-suffixes)) + (if (and fullname + (not (file-remote-p fullname)) + (file-remote-p default-directory)) + (setq fullname (expand-file-name + (concat "./" fullname) default-directory))) (if (and fullname (not (or eshell-force-execution (file-executable-p fullname)))) (while suffixes -- 2.39.2