1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-23 18:47:57 +00:00

* shell.el (shell): When called interactively, offer to change the

shell file name on remote hosts.
This commit is contained in:
Michael Albinus 2011-03-14 10:53:13 +01:00
parent cffc6f3bd9
commit 77c992bc50
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-03-14 Michael Albinus <michael.albinus@gmx.de>
* shell.el (shell): When called interactively, offer to change the
shell file name on remote hosts.
2011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
* net/ldap.el (ldap-search-internal): Add `auth-source-search'

View File

@ -583,6 +583,21 @@ Otherwise, one argument `-i' is passed to the shell.
(get-buffer-create (or buffer "*shell*"))
;; If the current buffer is a dead shell buffer, use it.
(current-buffer)))
;; On remote hosts, the local `shell-file-name' might be useless.
(if (and (interactive-p)
(file-remote-p default-directory)
(null explicit-shell-file-name)
(null (getenv "ESHELL")))
(with-current-buffer buffer
(set (make-local-variable 'explicit-shell-file-name)
(file-remote-p
(expand-file-name
(read-file-name
"Remote shell path: " default-directory shell-file-name
t shell-file-name))
'localname))))
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
(pop-to-buffer buffer)