]> git.eshelyaron.com Git - emacs.git/commitdiff
eshell/esh-ext.el: Expand relative remote file names.
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 24 Dec 2014 08:52:18 +0000 (09:52 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 24 Dec 2014 08:52:18 +0000 (09:52 +0100)
Fixes: debbugs:18782
* eshell/esh-ext.el (eshell-find-interpreter): Expand relative
remote file names.

lisp/ChangeLog
lisp/eshell/esh-ext.el

index 0b93d7673f96def706ed123627b71965c0809e23..0882a519f86d1455e67295c505c1d8daffa82f39 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-24  Michael Albinus  <michael.albinus@gmx.de>
+
+       * eshell/esh-ext.el (eshell-find-interpreter): Expand relative
+       remote file names.  (Bug#18782)
+
 2014-12-23  Sam Steingold  <sds@gnu.org>
 
        * shell.el (shell-display-buffer-actions): New user option.
index 2654bf21e6a425adbea12403d2904a65958b69de..d7fea47601cb0018fec92dc71e1002e3ff9e530c 100644 (file)
@@ -296,6 +296,11 @@ line of the form #!<interp>."
       (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