diff options
| author | Eli Zaretskii | 2019-09-18 15:15:33 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2019-09-18 15:15:33 +0300 |
| commit | 98586c2fe62fd26bc9105a06b78d93446bd2a269 (patch) | |
| tree | 050613d5124dbff9c0962108826f0e90a6c3f12d | |
| parent | 7ff2eef926f933c79c3913c18f9403a4a987756b (diff) | |
| parent | ffcec7cd4be83d03c21e7378efc55911b33696b1 (diff) | |
| download | emacs-98586c2fe62fd26bc9105a06b78d93446bd2a269.tar.gz emacs-98586c2fe62fd26bc9105a06b78d93446bd2a269.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
| -rw-r--r-- | doc/misc/tramp.texi | 29 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 4 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 7 |
3 files changed, 34 insertions, 6 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e6a454be4c8..1ed334b6bde 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -1591,6 +1591,7 @@ via the @command{CONNECT} command (conforming to RFC 2616, 2817 | |||
| 1591 | specifications). Proxy servers using HTTP 1.1 or later protocol | 1591 | specifications). Proxy servers using HTTP 1.1 or later protocol |
| 1592 | support this command. | 1592 | support this command. |
| 1593 | 1593 | ||
| 1594 | |||
| 1594 | @subsection Tunneling with ssh | 1595 | @subsection Tunneling with ssh |
| 1595 | 1596 | ||
| 1596 | With ssh, you could use the @code{ProxyCommand} entry in | 1597 | With ssh, you could use the @code{ProxyCommand} entry in |
| @@ -1609,6 +1610,7 @@ Any other program with such a feature could be used as well. | |||
| 1609 | In the example, opening @file{@trampfn{ssh,host.your.domain,}} passes | 1610 | In the example, opening @file{@trampfn{ssh,host.your.domain,}} passes |
| 1610 | the HTTP proxy server @samp{proxy.your.domain} on port 3128. | 1611 | the HTTP proxy server @samp{proxy.your.domain} on port 3128. |
| 1611 | 1612 | ||
| 1613 | |||
| 1612 | @subsection Tunneling with PuTTY | 1614 | @subsection Tunneling with PuTTY |
| 1613 | 1615 | ||
| 1614 | PuTTY does not need an external program, HTTP tunnel support is | 1616 | PuTTY does not need an external program, HTTP tunnel support is |
| @@ -2092,6 +2094,33 @@ be recomputed. To force @value{tramp} to recompute afresh, call | |||
| 2092 | 2094 | ||
| 2093 | @node Remote shell setup | 2095 | @node Remote shell setup |
| 2094 | @section Remote shell setup hints | 2096 | @section Remote shell setup hints |
| 2097 | |||
| 2098 | |||
| 2099 | @subsection Changing the default remote shell | ||
| 2100 | @cindex zsh setup | ||
| 2101 | |||
| 2102 | Per default, @value{tramp} uses the command @command{/bin/sh} for | ||
| 2103 | strting a shell on the remote host. This can be changed by setting | ||
| 2104 | the connection property @option{remote-shell}, see @xref{Predefined | ||
| 2105 | connection information}. Other properties might be adapted as well, | ||
| 2106 | like @option{remote-shell-login} or @option{remote-shell-args}. If | ||
| 2107 | you want, for example, use @command{/usr/bin/zsh} on a remote host, | ||
| 2108 | you might apply | ||
| 2109 | |||
| 2110 | @lisp | ||
| 2111 | @group | ||
| 2112 | (add-to-list 'tramp-connection-properties | ||
| 2113 | (list (regexp-quote "@trampfn{ssh,user@@host,}") | ||
| 2114 | "remote-shell" "/usr/bin/zsh")) | ||
| 2115 | @end group | ||
| 2116 | @end lisp | ||
| 2117 | |||
| 2118 | This approach has also the advantage, that settings in | ||
| 2119 | @code{tramp-sh-extra-args} will be applied. For zsh, the trouble | ||
| 2120 | with the shell prompt due to set zle options will be avoided. | ||
| 2121 | |||
| 2122 | |||
| 2123 | @subsection Other remote shell setup hints | ||
| 2095 | @cindex remote shell setup | 2124 | @cindex remote shell setup |
| 2096 | @cindex @file{.profile} file | 2125 | @cindex @file{.profile} file |
| 2097 | @cindex @file{.login} file | 2126 | @cindex @file{.login} file |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4bc37f01694..8092f6a5cf1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -525,7 +525,9 @@ based on the Tramp and Emacs versions, and should not be set here." | |||
| 525 | :type '(repeat string)) | 525 | :type '(repeat string)) |
| 526 | 526 | ||
| 527 | ;;;###tramp-autoload | 527 | ;;;###tramp-autoload |
| 528 | (defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) | 528 | (defcustom tramp-sh-extra-args |
| 529 | '(("/bash\\'" . "-norc -noprofile") | ||
| 530 | ("/zsh\\'" . "-f +Z")) | ||
| 529 | "Alist specifying extra arguments to pass to the remote shell. | 531 | "Alist specifying extra arguments to pass to the remote shell. |
| 530 | Entries are (REGEXP . ARGS) where REGEXP is a regular expression | 532 | Entries are (REGEXP . ARGS) where REGEXP is a regular expression |
| 531 | matching the shell file name and ARGS is a string specifying the | 533 | matching the shell file name and ARGS is a string specifying the |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 1554d3b70b1..d7e0a045106 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -2412,9 +2412,7 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2412 | (unwind-protect | 2412 | (unwind-protect |
| 2413 | ;; FIXME: This fails on my QNAP server, see | 2413 | ;; FIXME: This fails on my QNAP server, see |
| 2414 | ;; /share/Web/owncloud/data/owncloud.log | 2414 | ;; /share/Web/owncloud/data/owncloud.log |
| 2415 | (unless (and (tramp--test-nextcloud-p) | 2415 | (unless (tramp--test-nextcloud-p) |
| 2416 | (or (not (file-remote-p source)) | ||
| 2417 | (not (file-remote-p target)))) | ||
| 2418 | (make-directory source) | 2416 | (make-directory source) |
| 2419 | (should (file-directory-p source)) | 2417 | (should (file-directory-p source)) |
| 2420 | (write-region "foo" nil (expand-file-name "foo" source)) | 2418 | (write-region "foo" nil (expand-file-name "foo" source)) |
| @@ -2437,8 +2435,7 @@ This checks also `file-name-as-directory', `file-name-directory', | |||
| 2437 | (unwind-protect | 2435 | (unwind-protect |
| 2438 | ;; FIXME: This fails on my QNAP server, see | 2436 | ;; FIXME: This fails on my QNAP server, see |
| 2439 | ;; /share/Web/owncloud/data/owncloud.log | 2437 | ;; /share/Web/owncloud/data/owncloud.log |
| 2440 | (unless | 2438 | (unless (tramp--test-nextcloud-p) |
| 2441 | (and (tramp--test-nextcloud-p) (not (file-remote-p source))) | ||
| 2442 | (make-directory source) | 2439 | (make-directory source) |
| 2443 | (should (file-directory-p source)) | 2440 | (should (file-directory-p source)) |
| 2444 | (write-region "foo" nil (expand-file-name "foo" source)) | 2441 | (write-region "foo" nil (expand-file-name "foo" source)) |