emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tramp d6adcfc: Tramp ELPA version 2.4.2.3 released


From: Michael Albinus
Subject: [elpa] externals/tramp d6adcfc: Tramp ELPA version 2.4.2.3 released
Date: Thu, 26 Sep 2019 04:09:20 -0400 (EDT)

branch: externals/tramp
commit d6adcfc9e841ba2cdac607230157839a494bf988
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Tramp ELPA version 2.4.2.3 released
---
 test/tramp-tests.el |  55 ++++++++---
 texi/tramp.texi     |  48 +++++++++-
 texi/trampver.texi  |   2 +-
 tramp-adb.el        |  12 +--
 tramp-gvfs.el       |   4 +
 tramp-loaddefs.el   |   9 +-
 tramp-rclone.el     |  13 +--
 tramp-sh.el         | 258 ++++++++++++++++++++++++++-----------------------
 tramp-smb.el        |  73 +++++++-------
 tramp-sudoedit.el   |  25 +++--
 tramp.el            | 147 +++++++++++++++++-----------
 tramp.info          | 270 +++++++++++++++++++++++++++++-----------------------
 trampver.el         |   4 +-
 13 files changed, 535 insertions(+), 385 deletions(-)

diff --git a/test/tramp-tests.el b/test/tramp-tests.el
index 1b1e2e7..bfaf12f 100644
--- a/test/tramp-tests.el
+++ b/test/tramp-tests.el
@@ -2412,9 +2412,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (unwind-protect
              ;; FIXME: This fails on my QNAP server, see
              ;; /share/Web/owncloud/data/owncloud.log
-             (unless (and (tramp--test-nextcloud-p)
-                          (or (not (file-remote-p source))
-                              (not (file-remote-p target))))
+             (unless (tramp--test-nextcloud-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -2437,8 +2435,7 @@ This checks also `file-name-as-directory', 
`file-name-directory',
          (unwind-protect
              ;; FIXME: This fails on my QNAP server, see
              ;; /share/Web/owncloud/data/owncloud.log
-             (unless
-                 (and (tramp--test-nextcloud-p) (not (file-remote-p source)))
+             (unless (tramp--test-nextcloud-p)
                (make-directory source)
                (should (file-directory-p source))
                (write-region "foo" nil (expand-file-name "foo" source))
@@ -3479,7 +3476,9 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
                (setq tmp-name3 (concat (file-remote-p tmp-name3) tmp-name2)))))
 
        ;; Cleanup.
-       (ignore-errors (delete-directory tmp-name1 'recursive)))
+       (ignore-errors
+         (delete-file tmp-name3)
+         (delete-directory tmp-name1 'recursive)))
 
       ;; Detect cyclic symbolic links.
       (unwind-protect
@@ -4405,7 +4404,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              "foo"
              (funcall
               this-shell-command-to-string
-              (format "echo -n ${%s:?bla}" envvar))))))
+              (format "echo -n ${%s:-bla}" envvar))))))
 
       (unwind-protect
          ;; Set the empty value.
@@ -4417,7 +4416,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              "bla"
              (funcall
               this-shell-command-to-string
-              (format "echo -n ${%s:?bla}" envvar))))
+              (format "echo -n ${%s:-bla}" envvar))))
            ;; Variable is set.
            (should
             (string-match
@@ -4439,7 +4438,7 @@ This tests also `make-symbolic-link', `file-truename' and 
`add-name-to-file'."
              "foo"
              (funcall
               this-shell-command-to-string
-              (format "echo -n ${%s:?bla}" envvar))))
+              (format "echo -n ${%s:-bla}" envvar))))
            (let ((process-environment
                   (cons envvar process-environment)))
              ;; Variable is unset.
@@ -4448,12 +4447,14 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
                "bla"
                (funcall
                 this-shell-command-to-string
-                (format "echo -n ${%s:?bla}" envvar))))
+                (format "echo -n ${%s:-bla}" envvar))))
              ;; Variable is unset.
              (should-not
               (string-match
                (regexp-quote envvar)
-               (funcall this-shell-command-to-string "env")))))))))
+               ;; We must remove PS1, the output is truncated otherwise.
+               (funcall
+                this-shell-command-to-string "printenv | grep -v PS1")))))))))
 
 ;; This test is inspired by Bug#27009.
 (ert-deftest tramp-test33-environment-variables-and-port-numbers ()
@@ -5085,6 +5086,15 @@ Several special characters do not work properly there."
       (file-truename tramp-test-temporary-file-directory) nil
     (string-match "^HP-UX" (tramp-get-connection-property v "uname" ""))))
 
+(defun tramp--test-ksh-p ()
+  "Check, whether the remote shell is ksh.
+ksh93 makes some strange conversions of non-latin characters into
+a $'' syntax."
+  ;; We must refill the cache.  `file-truename' does it.
+  (with-parsed-tramp-file-name
+      (file-truename tramp-test-temporary-file-directory) nil
+    (string-match "ksh$" (tramp-get-connection-property v "remote-shell" ""))))
+
 (defun tramp--test-mock-p ()
   "Check, whether the mock method is used.
 This does not support external Emacs calls."
@@ -5153,7 +5163,8 @@ This requires restrictions of file name syntax."
           (tmp-name1 (tramp--test-make-temp-name nil quoted))
           (tmp-name2 (tramp--test-make-temp-name 'local quoted))
           (files (delq nil files))
-          (process-environment process-environment))
+          (process-environment process-environment)
+          (sorted-files (sort (copy-sequence files) #'string-lessp)))
       (unwind-protect
          (progn
            (make-directory tmp-name1)
@@ -5200,10 +5211,20 @@ This requires restrictions of file name syntax."
            ;; Check file names.
            (should (equal (directory-files
                            tmp-name1 nil directory-files-no-dot-files-regexp)
-                          (sort (copy-sequence files) #'string-lessp)))
+                          sorted-files))
            (should (equal (directory-files
                            tmp-name2 nil directory-files-no-dot-files-regexp)
-                          (sort (copy-sequence files) #'string-lessp)))
+                          sorted-files))
+           (should (equal (mapcar
+                           #'car
+                           (directory-files-and-attributes
+                            tmp-name1 nil directory-files-no-dot-files-regexp))
+                          sorted-files))
+           (should (equal (mapcar
+                           #'car
+                           (directory-files-and-attributes
+                            tmp-name2 nil directory-files-no-dot-files-regexp))
+                          sorted-files))
 
            ;; `substitute-in-file-name' could return different
            ;; values.  For `adb', there could be strange file
@@ -5290,7 +5311,7 @@ This requires restrictions of file name syntax."
                  ;; of process output.  So we unset it temporarily.
                  (setenv "PS1")
                  (with-temp-buffer
-                   (should (zerop (process-file "env" nil t nil)))
+                   (should (zerop (process-file "printenv" nil t nil)))
                    (goto-char (point-min))
                    (should
                     (re-search-forward
@@ -5469,6 +5490,7 @@ Use the `ls' command."
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-batch)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
+  (skip-unless (not (tramp--test-ksh-p)))
 
   (tramp--test-utf8))
 
@@ -5482,6 +5504,7 @@ Use the `stat' command."
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-batch)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
+  (skip-unless (not (tramp--test-ksh-p)))
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-stat v)))
 
@@ -5502,6 +5525,7 @@ Use the `perl' command."
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-batch)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
+  (skip-unless (not (tramp--test-ksh-p)))
   (with-parsed-tramp-file-name tramp-test-temporary-file-directory nil
     (skip-unless (tramp-get-remote-perl v)))
 
@@ -5525,6 +5549,7 @@ Use the `ls' command."
   (skip-unless (not (tramp--test-rsync-p)))
   (skip-unless (not (tramp--test-windows-nt-and-batch)))
   (skip-unless (not (tramp--test-windows-nt-and-pscp-psftp-p)))
+  (skip-unless (not (tramp--test-ksh-p)))
 
   (let ((tramp-connection-properties
         (append
diff --git a/texi/tramp.texi b/texi/tramp.texi
index 1185e0e..4cb390c 100644
--- a/texi/tramp.texi
+++ b/texi/tramp.texi
@@ -805,7 +805,8 @@ behavior.
 
 Works like @option{ssh} but without the extra authentication prompts.
 @option{sshx} uses @samp{ssh -t -t @var{host} -l @var{user} /bin/sh}
-to open a connection with a ``standard'' login shell.
+to open a connection with a ``standard'' login shell.  It supports
+changing the remote login shell @command{/bin/sh}.
 
 @strong{Note} that @option{sshx} does not bypass authentication
 questions.  For example, if the host key of the remote host is not
@@ -841,7 +842,7 @@ This is another method from the Kerberos suite.  It behaves 
like @option{su}.
 
 @option{plink} method is for MS Windows users with the PuTTY
 implementation of SSH@.  It uses @samp{plink -ssh} to log in to the
-remote host.
+remote host.  It supports changing the remote login shell @command{/bin/sh}.
 
 Check the @samp{Share SSH connections if possible} control for that
 session.
@@ -854,7 +855,8 @@ session.
 
 Another method using PuTTY on MS Windows with session names instead of
 host names.  @option{plinkx} calls @samp{plink -load @var{session}
--t}.  User names and port numbers must be defined in the session.
+-t}.  User names and port numbers must be defined in the session.  It
+supports changing the remote login shell @command{/bin/sh}.
 
 Check the @samp{Share SSH connections if possible} control for that
 session.
@@ -928,7 +930,8 @@ This method supports the @samp{-p} argument.
 
 @option{scpx} is useful to avoid login shell questions.  It is similar
 in performance to @option{scp}.  @option{scpx} uses @samp{ssh -t -t
-@var{host} -l @var{user} /bin/sh} to open a connection.
+@var{host} -l @var{user} /bin/sh} to open a connection.  It supports
+changing the remote login shell @command{/bin/sh}.
 
 @option{scpx} is useful for MS Windows users when @command{ssh}
 triggers an error about allocating a pseudo tty.  This happens due to
@@ -952,6 +955,8 @@ use the @command{plink} command to connect to the remote 
host, and
 they use @command{pscp} or @command{psftp} for transferring the files.
 These programs are part of PuTTY, an SSH implementation for MS Windows.
 
+They support changing the remote login shell @command{/bin/sh}.
+
 Check the @samp{Share SSH connections if possible} control for that
 session.
 
@@ -1591,6 +1596,7 @@ via the @command{CONNECT} command (conforming to RFC 
2616, 2817
 specifications).  Proxy servers using HTTP 1.1 or later protocol
 support this command.
 
+
 @subsection Tunneling with ssh
 
 With ssh, you could use the @code{ProxyCommand} entry in
@@ -1609,6 +1615,7 @@ Any other program with such a feature could be used as 
well.
 In the example, opening @file{@trampfn{ssh,host.your.domain,}} passes
 the HTTP proxy server @samp{proxy.your.domain} on port 3128.
 
+
 @subsection Tunneling with PuTTY
 
 PuTTY does not need an external program, HTTP tunnel support is
@@ -2092,6 +2099,36 @@ be recomputed.  To force @value{tramp} to recompute 
afresh, call
 
 @node Remote shell setup
 @section Remote shell setup hints
+
+
+@subsection Changing the default remote shell
+@cindex zsh setup
+
+Per default, @value{tramp} uses the command @command{/bin/sh} for
+starting a shell on the remote host.  This can be changed by setting
+the connection property @option{remote-shell}, see @xref{Predefined
+connection information}.  If you want, for example, use
+@command{/usr/bin/zsh} on a remote host, you might apply
+
+@lisp
+@group
+(add-to-list 'tramp-connection-properties
+             (list (regexp-quote "@trampfn{ssh,user@@host,}")
+                   "remote-shell" "/usr/bin/zsh"))
+@end group
+@end lisp
+
+This works only for connection methods which allow to override the
+remote login shell, like @option{sshx} or @option{plink}.  See
+@ref{Inline methods} and @ref{External methods} for connection methods
+which support this.
+
+This approach has also the advantage, that settings in
+@code{tramp-sh-extra-args} will be applied.  For zsh, the trouble
+with the shell prompt due to set zle options will be avoided.
+
+
+@subsection Other remote shell setup hints
 @cindex remote shell setup
 @cindex @file{.profile} file
 @cindex @file{.login} file
@@ -3737,6 +3774,9 @@ This uses the default value of @code{tramp-terminal-type},
 you want to use another value for @env{TERM}, change
 @code{tramp-terminal-type} and this line accordingly.
 
+Alternatively, you could set the remote login shell explicitly.  See
+@ref{Remote shell setup} for discussion of this technique,
+
 When using fish shell on remote hosts, disable fancy formatting by
 adding the following to @file{~/.config/fish/config.fish}:
 
diff --git a/texi/trampver.texi b/texi/trampver.texi
index 6a2daea..a8a89c9 100644
--- a/texi/trampver.texi
+++ b/texi/trampver.texi
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version numbers are auto-frobbed from
 @c tramp.el, and the bug report address is auto-frobbed from
 @c configure.ac.
-@set trampver 2.4.2.2
+@set trampver 2.4.2.3
 @set tramp-bug-report-address tramp-devel@@gnu.org
 @set emacsver 24.4
 
diff --git a/tramp-adb.el b/tramp-adb.el
index df4778c..982522b 100644
--- a/tramp-adb.el
+++ b/tramp-adb.el
@@ -1191,6 +1191,10 @@ FMT and ARGS are passed to `error'."
   "Maybe open a connection VEC.
 Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   (let* ((buf (tramp-get-connection-buffer vec))
         (p (get-buffer-process buf))
         (host (tramp-file-name-host vec))
@@ -1204,14 +1208,6 @@ connection if a previous connection has died for some 
reason."
       (tramp-error vec 'file-error "Cannot switch to user `%s'" user))
 
     (unless (process-live-p p)
-      ;; During completion, don't reopen a new connection.  We check
-      ;; this for the process related to `tramp-buffer-name';
-      ;; otherwise `start-file-process' wouldn't run ever when
-      ;; `non-essential' is non-nil.
-      (when (and (tramp-completion-mode-p)
-                (null (get-process (tramp-buffer-name vec))))
-       (throw 'non-essential 'non-essential))
-
       (save-match-data
        (when (and p (processp p)) (delete-process p))
        (if (zerop (length device))
diff --git a/tramp-gvfs.el b/tramp-gvfs.el
index b9b6b4b..1036865 100644
--- a/tramp-gvfs.el
+++ b/tramp-gvfs.el
@@ -1787,6 +1787,10 @@ This is relevant for GNOME Online Accounts."
   "Maybe open a connection VEC.
 Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   ;; We set the file name, in case there are incoming D-Bus signals or
   ;; D-Bus errors.
   (setq tramp-gvfs-dbus-event-vector vec)
diff --git a/tramp-loaddefs.el b/tramp-loaddefs.el
index 8fde671..302fe2d 100644
--- a/tramp-loaddefs.el
+++ b/tramp-loaddefs.el
@@ -331,6 +331,9 @@ Return a list of (nil host) tuples allowed to access.
 ;;;### (autoloads nil "tramp-sh" "tramp-sh.el" (0 0 0 0))
 ;;; Generated autoloads from tramp-sh.el
 
+(defconst tramp-default-remote-shell "/bin/sh" "\
+The default remote shell Tramp applies.")
+
 (defvar tramp-inline-compress-start-size 4096 "\
 The minimum size of compressing where inline transfer.
 When inline transfer, compress transferred data of file whose
@@ -378,7 +381,7 @@ Whether to use `tramp-ssh-controlmaster-options'.")
 
 (custom-autoload 'tramp-use-ssh-controlmaster-options "tramp-sh" t)
 
-(tramp--with-startup (add-to-list 'tramp-methods '("rcp" (tramp-login-program 
"rsh") (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-shell "/bin/sh") 
(tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) 
(tramp-copy-program "rcp") (tramp-copy-args (("-p" "%k") ("-r"))) 
(tramp-copy-keep-date t) (tramp-copy-recursive t))) (add-to-list 'tramp-methods 
'("remcp" (tramp-login-program "remsh") (tramp-login-args (("%h") ("-l" "%u"))) 
(tramp-remote-shell "/bin/sh") (tramp-remot [...]
+(tramp--with-startup (add-to-list 'tramp-methods `("rcp" (tramp-login-program 
"rsh") (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-shell 
,tramp-default-remote-shell) (tramp-remote-shell-login ("-l")) 
(tramp-remote-shell-args ("-c")) (tramp-copy-program "rcp") (tramp-copy-args 
(("-p" "%k") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t))) 
(add-to-list 'tramp-methods `("remcp" (tramp-login-program "remsh") 
(tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-shell ,tram [...]
 
 (defconst tramp-completion-function-alist-rsh '((tramp-parse-rhosts 
"/etc/hosts.equiv") (tramp-parse-rhosts "~/.rhosts")) "\
 Default list of (FUNCTION FILE) pairs to be examined for rsh methods.")
@@ -441,7 +444,7 @@ based on the Tramp and Emacs versions, and should not be 
set here.")
 
 (custom-autoload 'tramp-remote-process-environment "tramp-sh" t)
 
-(defvar tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile")) "\
+(defvar tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile") ("/zsh\\'" . 
"-f +Z")) "\
 Alist specifying extra arguments to pass to the remote shell.
 Entries are (REGEXP . ARGS) where REGEXP is a regular expression
 matching the shell file name and ARGS is a string specifying the
@@ -577,7 +580,7 @@ UU-encode the region between BEG and END.
 ;;;### (autoloads nil "trampver" "trampver.el" (0 0 0 0))
 ;;; Generated autoloads from trampver.el
 
-(defconst tramp-version "2.4.2.2" "\
+(defconst tramp-version "2.4.2.3" "\
 This version of Tramp.")
 
 (defconst tramp-bug-report-address "address@hidden" "\
diff --git a/tramp-rclone.el b/tramp-rclone.el
index 866e779..1f0c7ea 100644
--- a/tramp-rclone.el
+++ b/tramp-rclone.el
@@ -520,19 +520,14 @@ file names."
   "Maybe open a connection VEC.
 Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   (let ((host (tramp-file-name-host vec)))
     (when (rassoc `(,host) (tramp-rclone-parse-device-names nil))
       (if (zerop (length host))
          (tramp-error vec 'file-error "Storage %s not connected" host))
-
-      ;; During completion, don't reopen a new connection.  We check
-      ;; this for the process related to `tramp-buffer-name';
-      ;; otherwise `start-file-process' wouldn't run ever when
-      ;; `non-essential' is non-nil.
-      (when (and (tramp-completion-mode-p)
-                (null (get-process (tramp-buffer-name vec))))
-       (throw 'non-essential 'non-essential))
-
       ;; We need a process bound to the connection buffer.  Therefore,
       ;; we create a dummy process.  Maybe there is a better solution?
       (unless (get-buffer-process (tramp-get-connection-buffer vec))
diff --git a/tramp-sh.el b/tramp-sh.el
index 217e73a..a53eea4 100644
--- a/tramp-sh.el
+++ b/tramp-sh.el
@@ -38,6 +38,10 @@
 (defvar vc-hg-program)
 
 ;;;###tramp-autoload
+(defconst tramp-default-remote-shell "/bin/sh"
+  "The default remote shell Tramp applies.")
+
+;;;###tramp-autoload
 (defcustom tramp-inline-compress-start-size 4096
   "The minimum size of compressing where inline transfer.
 When inline transfer, compress transferred data of file whose
@@ -132,10 +136,10 @@ The string is used in `tramp-methods'.")
 ;;;###tramp-autoload
 (tramp--with-startup
  (add-to-list 'tramp-methods
-              '("rcp"
+              `("rcp"
                 (tramp-login-program        "rsh")
                 (tramp-login-args           (("%h") ("-l" "%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "rcp")
@@ -143,35 +147,37 @@ The string is used in `tramp-methods'.")
                 (tramp-copy-keep-date       t)
                 (tramp-copy-recursive       t)))
  (add-to-list 'tramp-methods
-              '("remcp"
+              `("remcp"
                 (tramp-login-program        "remsh")
                 (tramp-login-args           (("%h") ("-l" "%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "rcp")
                 (tramp-copy-args            (("-p" "%k")))
                 (tramp-copy-keep-date       t)))
  (add-to-list 'tramp-methods
-              '("scp"
+              `("scp"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
                                             ("-e" "none") ("%h")))
                 (tramp-async-args           (("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "scp")
-                (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q") 
("-r") ("%c")))
+                (tramp-copy-args            (("-P" "%p") ("-p" "%k") ("-q")
+                                            ("-r") ("%c")))
                 (tramp-copy-keep-date       t)
                 (tramp-copy-recursive       t)))
  (add-to-list 'tramp-methods
-              '("scpx"
+              `("scpx"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-                                            ("-e" "none") ("-t" "-t") ("%h") 
("/bin/sh")))
+                                            ("-e" "none") ("-t" "-t") ("%h")
+                                            ("%l")))
                 (tramp-async-args           (("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "scp")
@@ -180,64 +186,66 @@ The string is used in `tramp-methods'.")
                 (tramp-copy-keep-date       t)
                 (tramp-copy-recursive       t)))
  (add-to-list 'tramp-methods
-              '("rsync"
+              `("rsync"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
                                             ("-e" "none") ("%h")))
                 (tramp-async-args           (("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "rsync")
-                (tramp-copy-args            (("-t" "%k") ("-p") ("-r") ("-s") 
("-c")))
+                (tramp-copy-args            (("-t" "%k") ("-p") ("-r") ("-s")
+                                            ("-c")))
                 (tramp-copy-env             (("RSYNC_RSH") ("ssh" "%c")))
                 (tramp-copy-keep-date       t)
                 (tramp-copy-keep-tmpfile    t)
                 (tramp-copy-recursive       t)))
  (add-to-list 'tramp-methods
-              '("rsh"
+              `("rsh"
                 (tramp-login-program        "rsh")
                 (tramp-login-args           (("%h") ("-l" "%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
-              '("remsh"
+              `("remsh"
                 (tramp-login-program        "remsh")
                 (tramp-login-args           (("%h") ("-l" "%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
-              '("ssh"
+              `("ssh"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
                                             ("-e" "none") ("%h")))
                 (tramp-async-args           (("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
-              '("sshx"
+              `("sshx"
                 (tramp-login-program        "ssh")
                 (tramp-login-args           (("-l" "%u") ("-p" "%p") ("%c")
-                                            ("-e" "none") ("-t" "-t") ("%h") 
("/bin/sh")))
+                                            ("-e" "none") ("-t" "-t") ("%h")
+                                            ("%l")))
                 (tramp-async-args           (("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
-              '("telnet"
+              `("telnet"
                 (tramp-login-program        "telnet")
                 (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
-              '("nc"
+              `("nc"
                 (tramp-login-program        "telnet")
                 (tramp-login-args           (("%h") ("%p") ("2>/dev/null")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "nc")
@@ -247,24 +255,25 @@ The string is used in `tramp-methods'.")
                 ;; We use "-p" as required for newer busyboxes.  For older
                 ;; busybox/nc versions, the value must be (("-l") ("%r")).  
This
                 ;; can be achieved by tweaking `tramp-connection-properties'.
-                (tramp-remote-copy-args     (("-l") ("-p" "%r") 
("2>/dev/null")))))
+                (tramp-remote-copy-args     (("-l") ("-p" "%r")
+                                            ("2>/dev/null")))))
  (add-to-list 'tramp-methods
-              '("su"
+              `("su"
                 (tramp-login-program        "su")
                 (tramp-login-args           (("-") ("%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)))
  (add-to-list 'tramp-methods
-              '("sg"
+              `("sg"
                 (tramp-login-program        "sg")
                 (tramp-login-args           (("-") ("%u")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)))
  (add-to-list 'tramp-methods
-              '("sudo"
+              `("sudo"
                 (tramp-login-program        "sudo")
                 ;; The password template must be masked.  Otherwise,
                 ;; it could be interpreted as password prompt if the
@@ -273,46 +282,47 @@ The string is used in `tramp-methods'.")
                                             ("-p" 
"P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":")))
                 ;; Local $SHELL could be a nasty one, like zsh or
                 ;; fish.  Let's override it.
-                (tramp-login-env            (("SHELL") ("/bin/sh")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-login-env            (("SHELL")
+                                            (,tramp-default-remote-shell)))
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)
                 (tramp-session-timeout      300)))
  (add-to-list 'tramp-methods
-              '("doas"
+              `("doas"
                 (tramp-login-program        "doas")
                 (tramp-login-args           (("-u" "%u") ("-s")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)
                 (tramp-session-timeout      300)))
  (add-to-list 'tramp-methods
-              '("ksu"
+              `("ksu"
                 (tramp-login-program        "ksu")
                 (tramp-login-args           (("%u") ("-q")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-connection-timeout   10)))
  (add-to-list 'tramp-methods
-              '("krlogin"
+              `("krlogin"
                 (tramp-login-program        "krlogin")
                 (tramp-login-args           (("%h") ("-l" "%u") ("-x")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
               `("plink"
                 (tramp-login-program        "plink")
-                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") 
("-t")
-                                            ("%h") ("\"")
+                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh")
+                                            ("-t") ("%h") ("\"")
                                             (,(format
                                                "env 'TERM=%s' 
'PROMPT_COMMAND=' 'PS1=%s'"
                                                tramp-terminal-type
                                                tramp-initial-end-of-output))
-                                            ("/bin/sh") ("\"")))
-                (tramp-remote-shell         "/bin/sh")
+                                            ("%l") ("\"")))
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
@@ -323,50 +333,50 @@ The string is used in `tramp-methods'.")
                                                "env 'TERM=%s' 
'PROMPT_COMMAND=' 'PS1=%s'"
                                                tramp-terminal-type
                                                tramp-initial-end-of-output))
-                                            ("/bin/sh") ("\"")))
-                (tramp-remote-shell         "/bin/sh")
+                                            ("%l") ("\"")))
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))))
  (add-to-list 'tramp-methods
               `("pscp"
                 (tramp-login-program        "plink")
-                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") 
("-t")
-                                            ("%h") ("\"")
+                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh")
+                                            ("-t") ("%h") ("\"")
                                             (,(format
                                                "env 'TERM=%s' 
'PROMPT_COMMAND=' 'PS1=%s'"
                                                tramp-terminal-type
                                                tramp-initial-end-of-output))
-                                            ("/bin/sh") ("\"")))
-                (tramp-remote-shell         "/bin/sh")
+                                            ("%l") ("\"")))
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "pscp")
-                (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-scp") 
("-p" "%k")
-                                            ("-q") ("-r")))
+                (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-scp")
+                                            ("-p" "%k") ("-q") ("-r")))
                 (tramp-copy-keep-date       t)
                 (tramp-copy-recursive       t)))
  (add-to-list 'tramp-methods
               `("psftp"
                 (tramp-login-program        "plink")
-                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh") 
("-t")
-                                            ("%h") ("\"")
+                (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh")
+                                            ("-t") ("%h") ("\"")
                                             (,(format
                                                "env 'TERM=%s' 
'PROMPT_COMMAND=' 'PS1=%s'"
                                                tramp-terminal-type
                                                tramp-initial-end-of-output))
-                                            ("/bin/sh") ("\"")))
-                (tramp-remote-shell         "/bin/sh")
+                                            ("%l") ("\"")))
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-c"))
                 (tramp-copy-program         "pscp")
-                (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-sftp") 
("-p" "%k")
-                                            ("-q")))
+                (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-sftp")
+                                            ("-p" "%k") ("-q")))
                 (tramp-copy-keep-date       t)))
  (add-to-list 'tramp-methods
-              '("fcp"
+              `("fcp"
                 (tramp-login-program        "fsh")
                 (tramp-login-args           (("%h") ("-l" "%u") ("sh" "-i")))
-                (tramp-remote-shell         "/bin/sh")
+                (tramp-remote-shell         ,tramp-default-remote-shell)
                 (tramp-remote-shell-login   ("-l"))
                 (tramp-remote-shell-args    ("-i") ("-c"))
                 (tramp-copy-program         "fcp")
@@ -525,7 +535,9 @@ based on the Tramp and Emacs versions, and should not be 
set here."
   :type '(repeat string))
 
 ;;;###tramp-autoload
-(defcustom tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
+(defcustom tramp-sh-extra-args
+  '(("/bash\\'" . "-norc -noprofile")
+    ("/zsh\\'" . "-f +Z"))
   "Alist specifying extra arguments to pass to the remote shell.
 Entries are (REGEXP . ARGS) where REGEXP is a regular expression
 matching the shell file name and ARGS is a string specifying the
@@ -776,7 +788,8 @@ my $data;
 while (read STDIN, $data, 54) {
     my $pad = q();
 
-    # Only for the last chunk, and only if did not fill the last three-byte 
packet
+    # Only for the last chunk, and only if did not fill the last
+    # three-byte packet
     if (eof) {
         my $mod = length($data) %% 3;
         $pad = q(=) x (3 - $mod) if $mod;
@@ -1198,18 +1211,22 @@ component is used as the target of the symlink."
 
 (defun tramp-sh-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
-  (with-parsed-tramp-file-name filename nil
-    (with-tramp-file-property v localname "file-exists-p"
-      (or (not (null (tramp-get-file-property
-                      v localname "file-attributes-integer" nil)))
-          (not (null (tramp-get-file-property
-                      v localname "file-attributes-string" nil)))
-         (tramp-send-command-and-check
-          v
-          (format
-           "%s %s"
-           (tramp-get-file-exists-command v)
-           (tramp-shell-quote-argument localname)))))))
+  ;; `file-exists-p' is used as predicate in file name completion.
+  ;; We don't want to run it when `non-essential' is t, or there is
+  ;; no connection process yet.
+  (when (tramp-connectable-p filename)
+    (with-parsed-tramp-file-name filename nil
+      (with-tramp-file-property v localname "file-exists-p"
+       (or (not (null (tramp-get-file-property
+                       v localname "file-attributes-integer" nil)))
+            (not (null (tramp-get-file-property
+                       v localname "file-attributes-string" nil)))
+           (tramp-send-command-and-check
+            v
+            (format
+             "%s %s"
+             (tramp-get-file-exists-command v)
+             (tramp-shell-quote-argument localname))))))))
 
 (defun tramp-sh-handle-file-attributes (filename &optional id-format)
   "Like `file-attributes' for Tramp files."
@@ -1759,11 +1776,14 @@ of."
        ;; We must care about file names with spaces, or starting with
        ;; "-"; this would confuse xargs.  "ls -aQ" might be a
        ;; solution, but it does not work on all remote systems.
+       ;; Therefore, we use \000 as file separator.
+       ;; `tramp-sh--quoting-style-options' do not work for file names
+       ;; with spaces piped to "xargs".
        ;; Apostrophes in the stat output are masked as
        ;; `tramp-stat-marker', in order to make a proper shell escape
        ;; of them in file names.
-       "cd %s && echo \"(\"; (%s %s -a | "
-       "xargs %s -c "
+       "cd %s && echo \"(\"; (%s %s -a | tr '\\n\\r' '\\000\\000' | "
+       "xargs -0 %s -c "
        "'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
        "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\""))
     (tramp-shell-quote-argument localname)
@@ -4014,19 +4034,22 @@ file exists and nonzero exit status otherwise."
        vec 'file-error "Couldn't find command to check if file exists"))
     result))
 
+(defun tramp-get-sh-extra-args (shell)
+  "Find extra args for SHELL."
+  (let ((alist tramp-sh-extra-args)
+       item extra-args)
+    (while (and alist (null extra-args))
+      (setq item (pop alist))
+      (when (string-match-p (car item) shell)
+       (setq extra-args (cdr item))))
+    extra-args))
+
 (defun tramp-open-shell (vec shell)
   "Opens shell SHELL."
   (with-tramp-progress-reporter
       vec 5 (format-message "Opening remote shell `%s'" shell)
     ;; Find arguments for this shell.
-    (let ((alist tramp-sh-extra-args)
-         item extra-args)
-      (while (and alist (null extra-args))
-       (setq item (pop alist))
-       (when (string-match-p (car item) shell)
-         (setq extra-args (cdr item))))
-      ;; It is useful to set the prompt in the following command
-      ;; because some people have a setting for $PS1 which /bin/sh
+    (let ((extra-args (tramp-get-sh-extra-args shell)))
       ;; doesn't know about and thus /bin/sh will display a strange
       ;; prompt.  For example, if $PS1 has "${CWD}" in the value, then
       ;; ksh will display the current working directory but /bin/sh
@@ -4759,6 +4782,10 @@ If there is just some editing, retry it after 5 seconds."
   "Maybe open a connection VEC.
 Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   (let ((p (tramp-get-connection-process vec))
        (process-name (tramp-get-connection-property vec "process-name" nil))
        (process-environment (copy-sequence process-environment))
@@ -4803,15 +4830,6 @@ connection if a previous connection has died for some 
reason."
     ;; New connection must be opened.
     (condition-case err
        (unless (process-live-p p)
-
-         ;; During completion, don't reopen a new connection.  We
-         ;; check this for the process related to
-         ;; `tramp-buffer-name'; otherwise `start-file-process'
-         ;; wouldn't run ever when `non-essential' is non-nil.
-         (when (and (tramp-completion-mode-p)
-                    (null (get-process (tramp-buffer-name vec))))
-           (throw 'non-essential 'non-essential))
-
          (with-tramp-progress-reporter
              vec 3
              (if (zerop (length (tramp-file-name-user vec)))
@@ -4890,6 +4908,9 @@ connection if a previous connection has died for some 
reason."
                          (tramp-get-method-parameter hop 'tramp-login-program))
                         (login-args
                          (tramp-get-method-parameter hop 'tramp-login-args))
+                        (remote-shell
+                         (tramp-get-method-parameter hop 'tramp-remote-shell))
+                        (extra-args (tramp-get-sh-extra-args remote-shell))
                         (login-env
                          (tramp-get-method-parameter hop 'tramp-login-env))
                         (async-args
@@ -4967,7 +4988,8 @@ connection if a previous connection has died for some 
reason."
                     spec (format-spec-make ?t tmpfile)
                     options (format-spec options spec)
                     spec (format-spec-make
-                          ?h l-host ?u l-user ?p l-port ?c options)
+                          ?h l-host ?u l-user ?p l-port ?c options
+                          ?l (concat remote-shell " " extra-args))
                     command
                     (concat
                      ;; We do not want to see the trailing local
@@ -5316,7 +5338,7 @@ Nonexistent directories are removed from spec."
                  (progn
                    (tramp-message
                     vec 3
-                    "`getconf PATH' not successful, using default value 
\"%s\"."
+                   "`getconf PATH' not successful, using default value \"%s\"."
                     "/bin:/usr/bin")
                    "/bin:/usr/bin"))))
             (own-remote-path
@@ -5506,25 +5528,30 @@ Nonexistent directories are removed from spec."
 (defun tramp-get-remote-stat (vec)
   "Determine remote `stat' command."
   (with-tramp-connection-property vec "stat"
-    (tramp-message vec 5 "Finding a suitable `stat' command")
-    (let ((result (tramp-find-executable
-                  vec "stat" (tramp-get-remote-path vec)))
-         tmp)
-      ;; Check whether stat(1) returns usable syntax.  "%s" does not
-      ;; work on older AIX systems.  Recent GNU stat versions (8.24?)
-      ;; use shell quoted format for "%N", we check the boundaries "`"
-      ;; and "'", therefore.  See Bug#23422 in coreutils.
-      ;; Since GNU stat 8.26, environment variable QUOTING_STYLE is
-      ;; supported.
-      (when result
-       (setq result (concat "env QUOTING_STYLE=locale " result)
-             tmp (tramp-send-command-and-read
-                  vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
-       (unless (and (listp tmp) (stringp (car tmp))
-                    (string-match-p "^\\(`/'\\|‘/’\\)$" (car tmp))
-                    (integerp (cadr tmp)))
-         (setq result nil)))
-      result)))
+    ;; stat on Solaris is buggy.  We've got reports for "SunOS 5.10"
+    ;; and "SunOS 5.11" so far.
+    (unless (string-match-p
+            (eval-when-compile (regexp-opt '("SunOS 5.10" "SunOS 5.11")))
+            (tramp-get-connection-property vec "uname" ""))
+      (tramp-message vec 5 "Finding a suitable `stat' command")
+      (let ((result (tramp-find-executable
+                    vec "stat" (tramp-get-remote-path vec)))
+           tmp)
+       ;; Check whether stat(1) returns usable syntax.  "%s" does not
+       ;; work on older AIX systems.  Recent GNU stat versions
+       ;; (8.24?)  use shell quoted format for "%N", we check the
+       ;; boundaries "`" and "'", therefore.  See Bug#23422 in
+       ;; coreutils.  Since GNU stat 8.26, environment variable
+       ;; QUOTING_STYLE is supported.
+       (when result
+         (setq result (concat "env QUOTING_STYLE=locale " result)
+               tmp (tramp-send-command-and-read
+                    vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror))
+         (unless (and (listp tmp) (stringp (car tmp))
+                      (string-match-p "^\\(`/'\\|‘/’\\)$" (car tmp))
+                      (integerp (cadr tmp)))
+           (setq result nil)))
+       result))))
 
 (defun tramp-get-remote-readlink (vec)
   "Determine remote `readlink' command."
@@ -5890,9 +5917,6 @@ function cell is returned to be applied on a buffer."
 ;;   way of passing credentials, like by using an SSL socket or
 ;;   something.  (David Kastrup)
 ;;
-;; * Reconnect directly to a compliant shell without first going
-;;   through the user's default shell.  (Pete Forman)
-;;
 ;; * Avoid the local shell entirely for starting remote processes.  If
 ;;   so, I think even a signal, when delivered directly to the local
 ;;   SSH instance, would correctly be propagated to the remote process
diff --git a/tramp-smb.el b/tramp-smb.el
index 5df26a1..b008e6b 100644
--- a/tramp-smb.el
+++ b/tramp-smb.el
@@ -832,12 +832,12 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are 
completely ignored."
   "Implement `file-attributes' for Tramp files using stat command."
   (tramp-message
    vec 5 "file attributes with stat: %s" (tramp-file-name-localname vec))
-  (with-current-buffer (tramp-get-connection-buffer vec)
-    (let* (size id link uid gid atime mtime ctime mode inode)
-      (when (tramp-smb-send-command
-            vec (format "stat \"%s\"" (tramp-smb-get-localname vec)))
+  (let* (size id link uid gid atime mtime ctime mode inode)
+    (when (tramp-smb-send-command
+          vec (format "stat \"%s\"" (tramp-smb-get-localname vec)))
 
-       ;; Loop the listing.
+      ;; Loop the listing.
+      (with-current-buffer (tramp-get-connection-buffer vec)
        (goto-char (point-min))
        (unless (re-search-forward tramp-smb-errors nil t)
          (while (not (eobp))
@@ -1628,40 +1628,40 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME 
YEAR)."
   (with-parsed-tramp-file-name (file-name-as-directory directory) nil
     (setq localname (or localname "/"))
     (with-tramp-file-property v localname "file-entries"
-      (with-current-buffer (tramp-get-connection-buffer v)
-       (let* ((share (tramp-smb-get-share v))
-              (cache (tramp-get-connection-property v "share-cache" nil))
-              res entry)
-
-         (if (and (not share) cache)
-             ;; Return cached shares.
-             (setq res cache)
-
-           ;; Read entries.
-           (if share
-               (tramp-smb-send-command
-                v (format "dir \"%s*\"" (tramp-smb-get-localname v)))
-             ;; `tramp-smb-maybe-open-connection' lists also the share names.
-             (tramp-smb-maybe-open-connection v))
-
-           ;; Loop the listing.
+      (let* ((share (tramp-smb-get-share v))
+            (cache (tramp-get-connection-property v "share-cache" nil))
+            res entry)
+
+       (if (and (not share) cache)
+           ;; Return cached shares.
+           (setq res cache)
+
+         ;; Read entries.
+         (if share
+             (tramp-smb-send-command
+              v (format "dir \"%s*\"" (tramp-smb-get-localname v)))
+           ;; `tramp-smb-maybe-open-connection' lists also the share names.
+           (tramp-smb-maybe-open-connection v))
+
+         ;; Loop the listing.
+         (with-current-buffer (tramp-get-connection-buffer v)
            (goto-char (point-min))
            (if (re-search-forward tramp-smb-errors nil t)
                (tramp-error v 'file-error "%s `%s'" (match-string 0) directory)
              (while (not (eobp))
                (setq entry (tramp-smb-read-file-entry share))
                (forward-line)
-               (when entry (push entry res))))
+               (when entry (push entry res)))))
 
-           ;; Cache share entries.
-           (unless share
-             (tramp-set-connection-property v "share-cache" res)))
+         ;; Cache share entries.
+         (unless share
+           (tramp-set-connection-property v "share-cache" res)))
 
-         ;; Add directory itself.
-         (push '("" "drwxrwxrwx" 0 (0 0)) res)
+       ;; Add directory itself.
+       (push '("" "drwxrwxrwx" 0 (0 0)) res)
 
-         ;; Return entries.
-         (delq nil res))))))
+       ;; Return entries.
+       (delq nil res)))))
 
 ;; Return either a share name (if SHARE is nil), or a file name.
 ;;
@@ -1855,6 +1855,10 @@ Does not do anything if a connection is already open, 
but re-opens the
 connection if a previous connection has died for some reason.
 If ARGUMENT is non-nil, use it as argument for
 `tramp-smb-winexe-program', and suppress any checks."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   (let* ((share (tramp-smb-get-share vec))
         (buf (tramp-get-connection-buffer vec))
         (p (get-buffer-process buf)))
@@ -1909,15 +1913,6 @@ If ARGUMENT is non-nil, use it as argument for
                     (string-equal
                      share
                      (tramp-get-connection-property p "smb-share" ""))))
-
-      ;; During completion, don't reopen a new connection.  We
-      ;; check this for the process related to
-      ;; `tramp-buffer-name'; otherwise `start-file-process'
-      ;; wouldn't run ever when `non-essential' is non-nil.
-      (when (and (tramp-completion-mode-p)
-                (null (get-process (tramp-buffer-name vec))))
-       (throw 'non-essential 'non-essential))
-
       (save-match-data
        ;; There might be unread output from checking for share names.
        (when buf (with-current-buffer buf (erase-buffer)))
diff --git a/tramp-sudoedit.el b/tramp-sudoedit.el
index 80ce8f7..bfc9b3b 100644
--- a/tramp-sudoedit.el
+++ b/tramp-sudoedit.el
@@ -424,10 +424,14 @@ the result will be a local, non-Tramp, file name."
 
 (defun tramp-sudoedit-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
-  (with-parsed-tramp-file-name filename nil
-    (with-tramp-file-property v localname "file-exists-p"
-      (tramp-sudoedit-send-command
-       v "test" "-e" (tramp-compat-file-name-unquote localname)))))
+  ;; `file-exists-p' is used as predicate in file name completion.
+  ;; We don't want to run it when `non-essential' is t, or there is
+  ;; no connection process yet.
+  (when (tramp-connectable-p filename)
+    (with-parsed-tramp-file-name filename nil
+      (with-tramp-file-property v localname "file-exists-p"
+       (tramp-sudoedit-send-command
+        v "test" "-e" (tramp-compat-file-name-unquote localname))))))
 
 (defun tramp-sudoedit-handle-file-name-all-completions (filename directory)
   "Like `file-name-all-completions' for Tramp files."
@@ -760,18 +764,13 @@ Remove unneeded output."
   "Maybe open a connection VEC.
 Does not do anything if a connection is already open, but re-opens the
 connection if a previous connection has died for some reason."
+  ;; During completion, don't reopen a new connection.
+  (unless (tramp-connectable-p vec)
+    (throw 'non-essential 'non-essential))
+
   ;; We need a process bound to the connection buffer.  Therefore, we
   ;; create a dummy process.  Maybe there is a better solution?
   (unless (tramp-get-connection-process vec)
-
-    ;; During completion, don't reopen a new connection.  We check
-    ;; this for the process related to `tramp-buffer-name'; otherwise
-    ;; `start-file-process' wouldn't run ever when `non-essential' is
-    ;; non-nil.
-    (when (and (tramp-completion-mode-p)
-              (null (get-process (tramp-buffer-name vec))))
-      (throw 'non-essential 'non-essential))
-
     (let ((p (make-network-process
              :name (tramp-get-connection-name vec)
              :buffer (tramp-get-connection-buffer vec)
diff --git a/tramp.el b/tramp.el
index 4eea312..f0e600c 100644
--- a/tramp.el
+++ b/tramp.el
@@ -7,7 +7,7 @@
 ;; Maintainer: Michael Albinus <address@hidden>
 ;; Keywords: comm, processes
 ;; Package: tramp
-;; Version: 2.4.2.2
+;; Version: 2.4.2.3
 ;; Package-Requires: ((emacs "24.4"))
 ;; URL: https://savannah.gnu.org/projects/tramp
 
@@ -211,23 +211,41 @@ pair of the form (KEY VALUE).  The following KEYs are 
defined:
     or the name of telnet or a workalike, or the name of su or a workalike.
 
   * `tramp-login-args'
-    This specifies the list of arguments to pass to the above
-    mentioned program.  Please note that this is a list of list of arguments,
-    that is, normally you don't want to put \"-a -b\" or \"-f foo\"
-    here.  Instead, you want a list (\"-a\" \"-b\"), or (\"-f\" \"foo\").
-    There are some patterns: \"%h\" in this list is replaced by the host
-    name, \"%u\" is replaced by the user name, \"%p\" is replaced by the
-    port number, and \"%%\" can be used to obtain a literal percent character.
-    If a list containing \"%h\", \"%u\" or \"%p\" is unchanged during
-    expansion (i.e. no host or no user specified), this list is not used as
-    argument.  By this, arguments like (\"-l\" \"%u\") are optional.
-    \"%t\" is replaced by the temporary file name produced with
-    `tramp-make-tramp-temp-file'.  \"%k\" indicates the keep-date
-    parameter of a program, if exists.  \"%c\" adds additional
-    `tramp-ssh-controlmaster-options' options for the first hop.
-    The existence of `tramp-login-args', combined with the absence of
-    `tramp-copy-args', is an indication that the method is capable of
-     multi-hops.
+    This specifies a list of lists of arguments to pass to the
+    above mentioned program.  You normally want to put each
+    argument in an individual string, i.e.
+    (\"-a\" \"-b\") rather than (\"-a -b\").
+
+    \"%\" followed by a letter are expanded in the arguments as
+    follows:
+
+    - \"%h\" is replaced by the host name
+    - \"%u\" is replaced by the user name
+    - \"%p\" is replaced by the port number
+    - \"%%\" can be used to obtain a literal percent character.
+
+    If a sub-list containing \"%h\", \"%u\" or \"%p\" is
+    unchanged after expansion (i.e. no host, no user or no port
+    were specified), that sublist is not used.  For e.g.
+
+    '((\"-a\" \"-b\") (\"-l\" \"%u\"))
+
+    that means that (\"-l\" \"%u\") is used only if the user was
+    specified, and it is thus effectively optional.
+
+    Other expansions are:
+
+    - \"%l\" is replaced by the login shell `tramp-remote-shell'
+      and its parameters.
+    - \"%t\" is replaced by the temporary file name produced with
+      `tramp-make-tramp-temp-file'.
+    - \"%k\" indicates the keep-date parameter of a program, if exists.
+    - \"%c\" adds additional `tramp-ssh-controlmaster-options'
+      options for the first hop.
+
+    The existence of `tramp-login-args', combined with the
+    absence of `tramp-copy-args', is an indication that the
+    method is capable of multi-hops.
 
   * `tramp-login-env'
      A list of environment variables and their values, which will
@@ -327,6 +345,9 @@ inline method, then these two parameters should be nil.
 
 Notes:
 
+All these arguments can be overwritten by connection properties.
+See Info node `(tramp) Predefined connection information'.
+
 When using `su' or `sudo' the phrase \"open connection to a remote
 host\" sounds strange, but it is used nevertheless, for consistency.
 No connection is opened to a remote host, but `su' or `sudo' is
@@ -1566,25 +1587,27 @@ necessary only.  This function will be used in file 
name completion."
             tramp-postfix-host-format))
          (when localname localname)))
 
-(defun tramp-get-buffer (vec)
+(defun tramp-get-buffer (vec &optional dont-create)
   "Get the connection buffer to be used for VEC."
   (or (get-buffer (tramp-buffer-name vec))
-      (with-current-buffer (get-buffer-create (tramp-buffer-name vec))
-       ;; We use the existence of connection property "process-buffer"
-       ;; as indication, whether a connection is active.
-       (tramp-set-connection-property
-        vec "process-buffer"
-        (tramp-get-connection-property vec "process-buffer" nil))
-       (setq buffer-undo-list t
-             default-directory (tramp-make-tramp-file-name vec 'noloc 'nohop))
-       (current-buffer))))
-
-(defun tramp-get-connection-buffer (vec)
+      (unless dont-create
+       (with-current-buffer (get-buffer-create (tramp-buffer-name vec))
+         ;; We use the existence of connection property "process-buffer"
+         ;; as indication, whether a connection is active.
+         (tramp-set-connection-property
+          vec "process-buffer"
+          (tramp-get-connection-property vec "process-buffer" nil))
+         (setq buffer-undo-list t
+               default-directory
+               (tramp-make-tramp-file-name vec 'noloc 'nohop))
+         (current-buffer)))))
+
+(defun tramp-get-connection-buffer (vec &optional dont-create)
   "Get the connection buffer to be used for VEC.
 In case a second asynchronous communication has been started, it is different
 from `tramp-get-buffer'."
   (or (tramp-get-connection-property vec "process-buffer" nil)
-      (tramp-get-buffer vec)))
+      (tramp-get-buffer vec dont-create)))
 
 (defun tramp-get-connection-name (vec)
   "Get the connection name to be used for VEC.
@@ -1783,14 +1806,15 @@ applicable)."
       ;; Log only when there is a minimum level.
       (when (>= tramp-verbose 4)
        (let ((tramp-verbose 0))
-         ;; Append connection buffer for error messages.
+         ;; Append connection buffer for error messages, if exists.
          (when (= level 1)
-           (with-current-buffer
-               (if (processp vec-or-proc)
-                   (process-buffer vec-or-proc)
-                 (tramp-get-connection-buffer vec-or-proc))
-             (setq fmt-string (concat fmt-string "\n%s")
-                   arguments (append arguments (list (buffer-string))))))
+           (ignore-errors
+             (with-current-buffer
+                 (if (processp vec-or-proc)
+                     (process-buffer vec-or-proc)
+                   (tramp-get-connection-buffer vec-or-proc 'dont-create))
+               (setq fmt-string (concat fmt-string "\n%s")
+                     arguments (append arguments (list (buffer-string)))))))
          ;; Translate proc to vec.
          (when (processp vec-or-proc)
            (setq vec-or-proc (process-get vec-or-proc 'vector))))
@@ -2282,7 +2306,8 @@ preventing reentrant calls of Tramp.")
 
 (defun tramp-get-mutex (vec)
   "Return the mutex locking Tramp threads for VEC."
-  (let ((p (tramp-get-connection-process vec)))
+  (let ((p (and (tramp-connectable-p vec)
+               (tramp-get-connection-process vec))))
     (if p
       (with-tramp-connection-property p "mutex"
        (tramp-compat-funcall 'make-mutex (process-name p)))
@@ -2339,6 +2364,7 @@ If Emacs is compiled --with-threads, the body is 
protected by a mutex."
                          ;;  v 4 "Running `%s'..." (cons operation args))
                          ;; Switch process thread.
                          (when (and tramp-mutex
+                                    (tramp-connectable-p v)
                                     (setq p (tramp-get-connection-process v)))
                            (tramp-compat-funcall
                             'set-process-thread
@@ -2557,16 +2583,21 @@ Add operations defined in `HANDLER-alist' to 
`tramp-file-name-handler'."
    ;; This variable has been obsoleted in Emacs 26.
    tramp-completion-mode))
 
-(defun tramp-connectable-p (filename)
+(defun tramp-connectable-p (vec-or-filename)
   "Check, whether it is possible to connect the remote host w/o side-effects.
 This is true, if either the remote host is already connected, or if we are
 not in completion mode."
-  (let (tramp-verbose)
-    (and (tramp-tramp-file-p filename)
-        (or (not (tramp-completion-mode-p))
-            (process-live-p
-             (tramp-get-connection-process
-              (tramp-dissect-file-name filename)))))))
+  (let (tramp-verbose
+       (vec
+        (cond
+         ((tramp-file-name-p vec-or-filename) vec-or-filename)
+         ((tramp-tramp-file-p vec-or-filename)
+          (tramp-dissect-file-name vec-or-filename)))))
+    (or ;; We check this for the process related to
+       ;; `tramp-buffer-name'; otherwise `start-file-process'
+       ;; wouldn't run ever when `non-essential' is non-nil.
+        (and vec (process-live-p (get-process (tramp-buffer-name vec))))
+       (not (tramp-completion-mode-p)))))
 
 ;; Method, host name and user name completion.
 ;; `tramp-completion-dissect-file-name' returns a list of
@@ -2646,8 +2677,7 @@ not in completion mode."
   (try-completion
    filename
    (mapcar #'list (file-name-all-completions filename directory))
-   (when (and predicate
-             (tramp-connectable-p (expand-file-name filename directory)))
+   (when (and predicate (tramp-connectable-p directory))
      (lambda (x) (funcall predicate (expand-file-name (car x) directory))))))
 
 ;; I misuse a little bit the `tramp-file-name' structure in order to
@@ -3136,7 +3166,11 @@ User is always nil."
 
 (defun tramp-handle-file-exists-p (filename)
   "Like `file-exists-p' for Tramp files."
-  (not (null (file-attributes filename))))
+  ;; `file-exists-p' is used as predicate in file name completion.
+  ;; We don't want to run it when `non-essential' is t, or there is
+  ;; no connection process yet.
+  (when (tramp-connectable-p filename)
+    (not (null (file-attributes filename)))))
 
 (defun tramp-handle-file-in-directory-p (filename directory)
   "Like `file-in-directory-p' for Tramp files."
@@ -3160,10 +3194,10 @@ User is always nil."
 
 (defun tramp-handle-file-modes (filename)
   "Like `file-modes' for Tramp files."
-  (let ((truename (or (file-truename filename) filename)))
-    (when (file-exists-p truename)
-      (tramp-mode-string-to-int
-       (tramp-compat-file-attribute-modes (file-attributes truename))))))
+  ;; Starting with Emacs 25.1, `when-let' can be used.
+  (let ((attrs (file-attributes (or (file-truename filename) filename))))
+    (when attrs
+      (tramp-mode-string-to-int (tramp-compat-file-attribute-modes attrs)))))
 
 ;; Localname manipulation functions that grok Tramp localnames...
 (defun tramp-handle-file-name-as-directory (file)
@@ -4251,9 +4285,10 @@ the remote host use line-endings as defined in the 
variable
        (tramp-message vec 5 "Sentinel called: `%S' `%s'" proc event)
         (tramp-flush-connection-properties proc)
         (tramp-flush-directory-properties vec ""))
-      (goto-char (point-max))
-      (when (and prompt (re-search-backward (regexp-quote prompt) nil t))
-       (delete-region (point) (point-max))))))
+      (with-current-buffer (process-buffer proc)
+        (goto-char (point-max))
+        (when (and prompt (re-search-backward (regexp-quote prompt) nil t))
+         (delete-region (point) (point-max)))))))
 
 (defun tramp-get-inode (vec)
   "Returns the virtual inode number.
diff --git a/tramp.info b/tramp.info
index bd26ec5..4f9fa10 100644
--- a/tramp.info
+++ b/tramp.info
@@ -21,10 +21,10 @@ END-INFO-DIR-ENTRY
 
 File: tramp.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
 
-TRAMP 2.4.2.2 User Manual
+TRAMP 2.4.2.3 User Manual
 *************************
 
-This file documents TRAMP 2.4.2.2, a remote file editing package for
+This file documents TRAMP 2.4.2.3, a remote file editing package for
 Emacs.
 
    TRAMP stands for “Transparent Remote (file) Access, Multiple
@@ -598,7 +598,8 @@ the availability and usability of one of the commands 
defined in
 
      Works like ‘ssh’ but without the extra authentication prompts.
      ‘sshx’ uses ‘ssh -t -t HOST -l USER /bin/sh’ to open a connection
-     with a “standard” login shell.
+     with a “standard” login shell.  It supports changing the remote
+     login shell ‘/bin/sh’.
 
      *Note* that ‘sshx’ does not bypass authentication questions.  For
      example, if the host key of the remote host is not known, ‘sshx’
@@ -626,7 +627,8 @@ the availability and usability of one of the commands 
defined in
 
      ‘plink’ method is for MS Windows users with the PuTTY
      implementation of SSH.  It uses ‘plink -ssh’ to log in to the
-     remote host.
+     remote host.  It supports changing the remote login shell
+     ‘/bin/sh’.
 
      Check the ‘Share SSH connections if possible’ control for that
      session.
@@ -637,7 +639,8 @@ the availability and usability of one of the commands 
defined in
 
      Another method using PuTTY on MS Windows with session names instead
      of host names.  ‘plinkx’ calls ‘plink -load SESSION -t’.  User
-     names and port numbers must be defined in the session.
+     names and port numbers must be defined in the session.  It supports
+     changing the remote login shell ‘/bin/sh’.
 
      Check the ‘Share SSH connections if possible’ control for that
      session.
@@ -693,7 +696,8 @@ files smaller than ‘tramp-copy-size-limit’ still use inline 
methods.
 
      ‘scpx’ is useful to avoid login shell questions.  It is similar in
      performance to ‘scp’.  ‘scpx’ uses ‘ssh -t -t HOST -l USER /bin/sh’
-     to open a connection.
+     to open a connection.  It supports changing the remote login shell
+     ‘/bin/sh’.
 
      ‘scpx’ is useful for MS Windows users when ‘ssh’ triggers an error
      about allocating a pseudo tty.  This happens due to missing shell
@@ -709,6 +713,8 @@ files smaller than ‘tramp-copy-size-limit’ still use inline 
methods.
      or ‘psftp’ for transferring the files.  These programs are part of
      PuTTY, an SSH implementation for MS Windows.
 
+     They support changing the remote login shell ‘/bin/sh’.
+
      Check the ‘Share SSH connections if possible’ control for that
      session.
 
@@ -1593,6 +1599,29 @@ File: tramp.info,  Node: Remote shell setup,  Next: 
Android shell setup,  Prev:
 4.16 Remote shell setup hints
 =============================
 
+4.16.1 Changing the default remote shell
+----------------------------------------
+
+Per default, TRAMP uses the command ‘/bin/sh’ for starting a shell on
+the remote host.  This can be changed by setting the connection property
+‘remote-shell’, see *Note Predefined connection information::.  If you
+want, for example, use ‘/usr/bin/zsh’ on a remote host, you might apply
+
+     (add-to-list 'tramp-connection-properties
+                  (list (regexp-quote "/ssh:user@host:")
+                        "remote-shell" "/usr/bin/zsh"))
+
+   This works only for connection methods which allow to override the
+remote login shell, like ‘sshx’ or ‘plink’.  See *note Inline methods::
+and *note External methods:: for connection methods which support this.
+
+   This approach has also the advantage, that settings in
+‘tramp-sh-extra-args’ will be applied.  For zsh, the trouble with the
+shell prompt due to set zle options will be avoided.
+
+4.16.2 Other remote shell setup hints
+-------------------------------------
+
 TRAMP checks for the availability of standard programs in the usual
 locations.  Common tactics include successively trying ‘test -e’,
 ‘/usr/bin/test -e’, and ‘/bin/test -e’.  ‘ls -d’ is another approach.
@@ -2750,6 +2779,10 @@ File: tramp.info,  Node: Frequently Asked Questions,  
Next: Files directories an
           want to use another value for ‘TERM’, change
           ‘tramp-terminal-type’ and this line accordingly.
 
+          Alternatively, you could set the remote login shell
+          explicitly.  See *note Remote shell setup:: for discussion of
+          this technique,
+
           When using fish shell on remote hosts, disable fancy
           formatting by adding the following to
           ‘~/.config/fish/config.fish’:
@@ -3924,34 +3957,34 @@ Variable Index
 * customize-package-emacs-version-alist: Obtaining TRAMP.     (line  20)
 * DISPLAY, environment variable:         Remote processes.    (line  93)
 * EDITOR, environment variable:          Frequently Asked Questions.
-                                                              (line 536)
+                                                              (line 540)
 * ENV, environment variable:             Remote processes.    (line  64)
-* ESHELL, environment variable:          Remote shell setup.  (line 155)
+* ESHELL, environment variable:          Remote shell setup.  (line 178)
 * HGPLAIN, environment variable:         Remote processes.    (line  82)
 * HISTFILE, environment variable:        Frequently Asked Questions.
-                                                              (line 277)
+                                                              (line 281)
 * HISTFILESIZE, environment variable:    Frequently Asked Questions.
-                                                              (line 277)
+                                                              (line 281)
 * HISTORY, environment variable:         Remote processes.    (line  52)
 * HISTSIZE, environment variable:        Frequently Asked Questions.
-                                                              (line 277)
-* INSIDE_EMACS, environment variable:    Remote shell setup.  (line  72)
-* INSIDE_EMACS, environment variable <1>: Remote shell setup. (line 155)
+                                                              (line 281)
+* INSIDE_EMACS, environment variable:    Remote shell setup.  (line  95)
+* INSIDE_EMACS, environment variable <1>: Remote shell setup. (line 178)
 * non-essential:                         External packages.   (line   9)
 * password-cache:                        Password handling.   (line  57)
 * password-cache-expiry:                 Password handling.   (line  52)
-* PATH, environment variable:            External methods.    (line 182)
+* PATH, environment variable:            External methods.    (line 185)
 * remote-file-name-inhibit-cache:        Frequently Asked Questions.
                                                               (line  40)
 * shell-command-switch:                  Remote processes.    (line 158)
 * shell-file-name:                       Remote processes.    (line 158)
-* SHELLNAME, environment variable:       Remote shell setup.  (line 155)
+* SHELLNAME, environment variable:       Remote shell setup.  (line 178)
 * SSH_AUTH_SOCK, environment variable:   Windows setup hints. (line  29)
-* TERM, environment variable:            Remote shell setup.  (line  58)
-* TERM, environment variable <1>:        Remote shell setup.  (line  72)
-* tramp-actions-before-shell:            Remote shell setup.  (line 102)
-* tramp-adb-connect-if-not-connected:    External methods.    (line 190)
-* tramp-adb-program:                     External methods.    (line 182)
+* TERM, environment variable:            Remote shell setup.  (line  81)
+* TERM, environment variable <1>:        Remote shell setup.  (line  95)
+* tramp-actions-before-shell:            Remote shell setup.  (line 125)
+* tramp-adb-connect-if-not-connected:    External methods.    (line 193)
+* tramp-adb-program:                     External methods.    (line 185)
 * tramp-archive-all-gvfs-methods:        Archive file names.  (line  91)
 * tramp-archive-compression-suffixes:    Archive file names.  (line  83)
 * tramp-archive-suffixes:                Archive file names.  (line  27)
@@ -3979,36 +4012,36 @@ Variable Index
                                                               (line  28)
 * tramp-gvfs-methods:                    GVFS-based methods.  (line  60)
 * tramp-histfile-override:               Frequently Asked Questions.
-                                                              (line 277)
+                                                              (line 281)
 * tramp-ignored-file-name-regexp:        Frequently Asked Questions.
-                                                              (line 580)
+                                                              (line 584)
 * tramp-inline-compress-commands:        Inline methods.      (line  25)
 * tramp-inline-compress-start-size:      Inline methods.      (line  25)
 * tramp-local-host-regexp:               Frequently Asked Questions.
-                                                              (line 161)
+                                                              (line 165)
 * tramp-methods:                         Customizing Methods. (line   6)
 * tramp-mode:                            Frequently Asked Questions.
-                                                              (line 574)
+                                                              (line 578)
 * tramp-own-remote-path:                 Remote programs.     (line  32)
-* tramp-password-prompt-regexp:          Remote shell setup.  (line  33)
+* tramp-password-prompt-regexp:          Remote shell setup.  (line  56)
 * tramp-persistency-file-name:           Connection caching.  (line   6)
-* tramp-rclone-program:                  External methods.    (line 212)
+* tramp-rclone-program:                  External methods.    (line 215)
 * tramp-remote-coding-commands:          Inline methods.      (line  16)
 * tramp-remote-path:                     Remote programs.     (line  15)
 * tramp-remote-process-environment:      Remote processes.    (line  38)
 * tramp-restricted-shell-hosts-alist:    Multi-hops.          (line  84)
 * tramp-save-ad-hoc-proxies:             Ad-hoc multi-hops.   (line  29)
-* tramp-shell-prompt-pattern:            Remote shell setup.  (line  25)
+* tramp-shell-prompt-pattern:            Remote shell setup.  (line  48)
 * tramp-ssh-controlmaster-options:       Frequently Asked Questions.
-                                                              (line 184)
-* tramp-terminal-type:                   Remote shell setup.  (line  58)
+                                                              (line 188)
+* tramp-terminal-type:                   Remote shell setup.  (line  81)
 * tramp-theme-face-remapping-alist:      Frequently Asked Questions.
-                                                              (line 257)
+                                                              (line 261)
 * tramp-use-ssh-controlmaster-options:   Frequently Asked Questions.
-                                                              (line 197)
+                                                              (line 201)
 * tramp-verbose:                         Traces and Profiles. (line   6)
 * tramp-version:                         Obtaining TRAMP.     (line   6)
-* tramp-wrong-passwd-regexp:             Remote shell setup.  (line  33)
+* tramp-wrong-passwd-regexp:             Remote shell setup.  (line  56)
 
 
 File: tramp.info,  Node: Concept Index,  Prev: Variable Index,  Up: Top
@@ -4019,17 +4052,17 @@ Concept Index
 [index]
 * Menu:
 
-* .login file:                           Remote shell setup.  (line   6)
-* .profile file:                         Remote shell setup.  (line   6)
+* .login file:                           Remote shell setup.  (line  29)
+* .profile file:                         Remote shell setup.  (line  29)
 * 7z file archive suffix:                Archive file names.  (line  33)
 * adb method:                            Quick Start Guide.   (line 115)
-* adb method <1>:                        External methods.    (line 181)
+* adb method <1>:                        External methods.    (line 184)
 * afp method:                            Quick Start Guide.   (line  95)
 * afp method <1>:                        GVFS-based methods.  (line  16)
 * alternative file name syntax:          Change file name syntax.
                                                               (line   6)
 * android:                               Quick Start Guide.   (line 115)
-* android (with adb method):             External methods.    (line 181)
+* android (with adb method):             External methods.    (line 184)
 * android shell setup for ssh:           Android shell setup. (line   6)
 * apk file archive suffix:               Archive file names.  (line  35)
 * ar file archive suffix:                Archive file names.  (line  37)
@@ -4082,7 +4115,7 @@ Concept Index
 * fakecygpty and cygwin:                 Windows setup hints. (line  17)
 * FAQ:                                   Frequently Asked Questions.
                                                               (line   6)
-* fcp method:                            External methods.    (line  73)
+* fcp method:                            External methods.    (line  76)
 * file archive suffix 7z:                Archive file names.  (line  33)
 * file archive suffix apk:               Archive file names.  (line  35)
 * file archive suffix ar:                Archive file names.  (line  37)
@@ -4129,9 +4162,9 @@ Concept Index
 * file name syntax <1>:                  File name syntax.    (line   6)
 * frequently asked questions:            Frequently Asked Questions.
                                                               (line   6)
-* fsh (with fcp method):                 External methods.    (line  73)
-* fsh method:                            External methods.    (line  83)
-* ftp method:                            External methods.    (line 115)
+* fsh (with fcp method):                 External methods.    (line  76)
+* fsh method:                            External methods.    (line  86)
+* ftp method:                            External methods.    (line 118)
 * gdb:                                   Remote processes.    (line 208)
 * gdrive method:                         Quick Start Guide.   (line 104)
 * gdrive method <1>:                     GVFS-based methods.  (line  34)
@@ -4150,17 +4183,17 @@ Concept Index
 * inline methods:                        Inline methods.      (line   6)
 * iso file archive suffix:               Archive file names.  (line  49)
 * jar file archive suffix:               Archive file names.  (line  51)
-* kerberos (with krlogin method):        Inline methods.      (line 100)
-* kerberos (with ksu method):            Inline methods.      (line 105)
-* krlogin method:                        Inline methods.      (line 100)
-* ksu method:                            Inline methods.      (line 105)
+* kerberos (with krlogin method):        Inline methods.      (line 101)
+* kerberos (with ksu method):            Inline methods.      (line 106)
+* krlogin method:                        Inline methods.      (line 101)
+* ksu method:                            Inline methods.      (line 106)
 * kubectl method:                        Customizing Methods. (line  21)
 * lxc method:                            Customizing Methods. (line  27)
 * lxd method:                            Customizing Methods. (line  32)
 * lzh file archive suffix:               Archive file names.  (line  53)
 * LZH file archive suffix:               Archive file names.  (line  53)
 * method adb:                            Quick Start Guide.   (line 115)
-* method adb <1>:                        External methods.    (line 181)
+* method adb <1>:                        External methods.    (line 184)
 * method afp:                            Quick Start Guide.   (line  95)
 * method afp <1>:                        GVFS-based methods.  (line  16)
 * method archive:                        Archive file names.  (line   6)
@@ -4170,29 +4203,29 @@ Concept Index
 * method davs <1>:                       GVFS-based methods.  (line  24)
 * method doas:                           Inline methods.      (line  68)
 * method docker:                         Customizing Methods. (line  15)
-* method fcp:                            External methods.    (line  73)
-* method fsh:                            External methods.    (line  83)
-* method ftp:                            External methods.    (line 115)
+* method fcp:                            External methods.    (line  76)
+* method fsh:                            External methods.    (line  86)
+* method ftp:                            External methods.    (line 118)
 * method gdrive:                         Quick Start Guide.   (line 104)
 * method gdrive <1>:                     GVFS-based methods.  (line  34)
 * method git:                            Customizing Methods. (line  37)
 * method hdfs:                           Customizing Methods. (line  43)
-* method krlogin:                        Inline methods.      (line 100)
-* method ksu:                            Inline methods.      (line 105)
+* method krlogin:                        Inline methods.      (line 101)
+* method ksu:                            Inline methods.      (line 106)
 * method kubectl:                        Customizing Methods. (line  21)
 * method lxc:                            Customizing Methods. (line  27)
 * method lxd:                            Customizing Methods. (line  32)
-* method nc:                             External methods.    (line  88)
+* method nc:                             External methods.    (line  91)
 * method nextcloud:                      Quick Start Guide.   (line 104)
 * method nextcloud <1>:                  GVFS-based methods.  (line  47)
 * method plink:                          Quick Start Guide.   (line  44)
 * method plink <1>:                      Quick Start Guide.   (line  68)
-* method plink <2>:                      Inline methods.      (line 110)
-* method plinkx:                         Inline methods.      (line 121)
-* method pscp:                           External methods.    (line  61)
-* method psftp:                          External methods.    (line  61)
+* method plink <2>:                      Inline methods.      (line 111)
+* method plinkx:                         Inline methods.      (line 123)
+* method pscp:                           External methods.    (line  62)
+* method psftp:                          External methods.    (line  62)
 * method rclone:                         Quick Start Guide.   (line 122)
-* method rclone <1>:                     External methods.    (line 211)
+* method rclone <1>:                     External methods.    (line 214)
 * method rcp:                            External methods.    (line  17)
 * method rsh:                            Inline methods.      (line  32)
 * method rsync:                          External methods.    (line  37)
@@ -4204,7 +4237,7 @@ Concept Index
 * method sg:                             Quick Start Guide.   (line  56)
 * method sg <1>:                         Inline methods.      (line  74)
 * method smb:                            Quick Start Guide.   (line  87)
-* method smb <1>:                        External methods.    (line 121)
+* method smb <1>:                        External methods.    (line 124)
 * method ssh:                            Quick Start Guide.   (line  44)
 * method ssh <1>:                        Quick Start Guide.   (line  68)
 * method ssh <2>:                        Inline methods.      (line  37)
@@ -4217,7 +4250,7 @@ Concept Index
 * method sudo <1>:                       Quick Start Guide.   (line  68)
 * method sudo <2>:                       Inline methods.      (line  59)
 * method sudoedit:                       Quick Start Guide.   (line  78)
-* method sudoedit <1>:                   External methods.    (line  95)
+* method sudoedit <1>:                   External methods.    (line  98)
 * method telnet:                         Inline methods.      (line  47)
 * method vagrant:                        Customizing Methods. (line  48)
 * methods, external:                     External methods.    (line   6)
@@ -4225,14 +4258,14 @@ Concept Index
 * methods, gvfs <1>:                     GVFS-based methods.  (line   6)
 * methods, inline:                       Inline methods.      (line   6)
 * ms windows (with smb method):          Quick Start Guide.   (line  87)
-* ms windows (with smb method) <1>:      External methods.    (line 121)
+* ms windows (with smb method) <1>:      External methods.    (line 124)
 * msu file archive suffix:               Archive file names.  (line  55)
 * MSU file archive suffix:               Archive file names.  (line  55)
 * mtree file archive suffix:             Archive file names.  (line  57)
 * multi-hop:                             Multi-hops.          (line   6)
 * multi-hop, ad-hoc:                     Ad-hoc multi-hops.   (line   6)
-* nc method:                             External methods.    (line  88)
-* nc unix command:                       Remote shell setup.  (line 180)
+* nc method:                             External methods.    (line  91)
+* nc unix command:                       Remote shell setup.  (line 203)
 * nextcloud:                             Quick Start Guide.   (line 104)
 * nextcloud <1>:                         GVFS-based methods.  (line  47)
 * nextcloud method:                      Quick Start Guide.   (line 104)
@@ -4248,27 +4281,27 @@ Concept Index
 * passwords:                             Password handling.   (line   6)
 * pax file archive suffix:               Archive file names.  (line  62)
 * perldb:                                Remote processes.    (line 208)
-* plink (with pscp method):              External methods.    (line  61)
-* plink (with psftp method):             External methods.    (line  61)
+* plink (with pscp method):              External methods.    (line  62)
+* plink (with psftp method):             External methods.    (line  62)
 * plink method:                          Quick Start Guide.   (line  44)
 * plink method <1>:                      Quick Start Guide.   (line  68)
-* plink method <2>:                      Inline methods.      (line 110)
-* plinkx method:                         Inline methods.      (line 121)
+* plink method <2>:                      Inline methods.      (line 111)
+* plinkx method:                         Inline methods.      (line 123)
 * powershell:                            Remote processes.    (line 239)
 * proxy hosts:                           Multi-hops.          (line   6)
 * proxy hosts, ad-hoc:                   Ad-hoc multi-hops.   (line   6)
 * proxy hosts, http tunnel:              Firewalls.           (line   6)
-* pscp method:                           External methods.    (line  61)
-* psftp method:                          External methods.    (line  61)
-* putty (with pscp method):              External methods.    (line  61)
-* putty (with psftp method):             External methods.    (line  61)
+* pscp method:                           External methods.    (line  62)
+* psftp method:                          External methods.    (line  62)
+* putty (with pscp method):              External methods.    (line  62)
+* putty (with psftp method):             External methods.    (line  62)
 * quick start guide:                     Quick Start Guide.   (line   6)
 * rar file archive suffix:               Archive file names.  (line  64)
 * rclone method:                         Quick Start Guide.   (line 122)
-* rclone method <1>:                     External methods.    (line 211)
+* rclone method <1>:                     External methods.    (line 214)
 * rcp method:                            External methods.    (line  17)
 * recompile:                             Remote processes.    (line   6)
-* remote shell setup:                    Remote shell setup.  (line   6)
+* remote shell setup:                    Remote shell setup.  (line  29)
 * rpm file archive suffix:               Archive file names.  (line  66)
 * rsh (with rcp method):                 External methods.    (line  17)
 * rsh method:                            Inline methods.      (line  32)
@@ -4286,14 +4319,14 @@ Concept Index
 * sg method <1>:                         Inline methods.      (line  74)
 * shar file archive suffix:              Archive file names.  (line  68)
 * shell:                                 Remote processes.    (line 112)
-* shell init files:                      Remote shell setup.  (line   6)
+* shell init files:                      Remote shell setup.  (line  29)
 * shell-command:                         Remote processes.    (line 146)
 * simplified syntax:                     Change file name syntax.
                                                               (line  14)
 * smb method:                            Quick Start Guide.   (line  87)
-* smb method <1>:                        External methods.    (line 121)
+* smb method <1>:                        External methods.    (line 124)
 * smbclient:                             Quick Start Guide.   (line  87)
-* smbclient <1>:                         External methods.    (line 121)
+* smbclient <1>:                         External methods.    (line 124)
 * ssh (with rsync method):               External methods.    (line  37)
 * ssh (with scp method):                 External methods.    (line  25)
 * ssh (with scpx method):                External methods.    (line  48)
@@ -4310,21 +4343,21 @@ Concept Index
 * sudo method <1>:                       Quick Start Guide.   (line  68)
 * sudo method <2>:                       Inline methods.      (line  59)
 * sudoedit method:                       Quick Start Guide.   (line  78)
-* sudoedit method <1>:                   External methods.    (line  95)
+* sudoedit method <1>:                   External methods.    (line  98)
 * tar file archive suffix:               Archive file names.  (line  71)
 * tbz file archive suffix:               Archive file names.  (line  71)
-* telnet (with nc method):               External methods.    (line  88)
+* telnet (with nc method):               External methods.    (line  91)
 * telnet method:                         Inline methods.      (line  47)
 * tgz file archive suffix:               Archive file names.  (line  71)
 * tlz file archive suffix:               Archive file names.  (line  71)
 * TRAMP theme:                           Frequently Asked Questions.
-                                                              (line 257)
-* tset unix command:                     Remote shell setup.  (line  92)
+                                                              (line 261)
+* tset unix command:                     Remote shell setup.  (line 115)
 * txz file archive suffix:               Archive file names.  (line  71)
 * type-ahead:                            Usage.               (line  12)
 * tzst file archive suffix:              Archive file names.  (line  71)
-* unix command nc:                       Remote shell setup.  (line 180)
-* unix command tset:                     Remote shell setup.  (line  92)
+* unix command nc:                       Remote shell setup.  (line 203)
+* unix command tset:                     Remote shell setup.  (line 115)
 * using non-standard methods:            Customizing Methods. (line   6)
 * using TRAMP:                           Usage.               (line   6)
 * uu encoding:                           Inline methods.      (line  16)
@@ -4336,6 +4369,7 @@ Concept Index
 * xps file archive suffix:               Archive file names.  (line  79)
 * zip file archive suffix:               Archive file names.  (line  81)
 * ZIP file archive suffix:               Archive file names.  (line  81)
+* zsh setup:                             Remote shell setup.  (line   9)
 
 
 
@@ -4357,44 +4391,44 @@ Ref: Quick Start Guide: rclone method18576
 Node: Configuration18903
 Node: Connection types21375
 Node: Inline methods22789
-Node: External methods27556
-Node: GVFS-based methods38075
-Node: Default Method41344
-Node: Default User44361
-Node: Default Host45884
-Node: Multi-hops47016
-Node: Firewalls51208
-Node: Customizing Methods52665
-Node: Customizing Completion55005
-Node: Password handling58495
-Ref: Using an authentication file58965
-Ref: Caching passwords60467
-Node: Connection caching60985
-Node: Predefined connection information61915
-Node: Remote programs64260
-Node: Remote shell setup67181
-Node: Android shell setup75391
-Node: Auto-save and Backup77778
-Node: Windows setup hints80853
-Node: Usage82473
-Node: File name syntax83771
-Node: Change file name syntax85778
-Node: File name completion87209
-Node: Ad-hoc multi-hops90282
-Node: Remote processes92348
-Ref: Running a debugger on a remote host101106
-Node: Cleanup remote connections103076
-Node: Archive file names104610
-Node: Bug Reports108983
-Node: Frequently Asked Questions111365
-Node: Files directories and localnames133649
-Node: Localname deconstruction134085
-Node: External packages134738
-Node: Traces and Profiles136783
-Node: GNU Free Documentation License138752
-Node: Function Index164123
-Node: Variable Index166727
-Node: Concept Index173916
+Node: External methods27751
+Node: GVFS-based methods38401
+Node: Default Method41670
+Node: Default User44687
+Node: Default Host46210
+Node: Multi-hops47342
+Node: Firewalls51534
+Node: Customizing Methods52991
+Node: Customizing Completion55331
+Node: Password handling58821
+Ref: Using an authentication file59291
+Ref: Caching passwords60793
+Node: Connection caching61311
+Node: Predefined connection information62241
+Node: Remote programs64586
+Node: Remote shell setup67507
+Node: Android shell setup76746
+Node: Auto-save and Backup79133
+Node: Windows setup hints82208
+Node: Usage83828
+Node: File name syntax85126
+Node: Change file name syntax87133
+Node: File name completion88564
+Node: Ad-hoc multi-hops91637
+Node: Remote processes93703
+Ref: Running a debugger on a remote host102461
+Node: Cleanup remote connections104431
+Node: Archive file names105965
+Node: Bug Reports110338
+Node: Frequently Asked Questions112720
+Node: Files directories and localnames135165
+Node: Localname deconstruction135601
+Node: External packages136254
+Node: Traces and Profiles138299
+Node: GNU Free Documentation License140268
+Node: Function Index165639
+Node: Variable Index168243
+Node: Concept Index175432
 
 End Tag Table
 
diff --git a/trampver.el b/trampver.el
index 80aa3eb..c6cda03 100644
--- a/trampver.el
+++ b/trampver.el
@@ -31,7 +31,7 @@
 ;; aclocal.m4; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.4.2.2"
+(defconst tramp-version "2.4.2.3"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
@@ -65,7 +65,7 @@
 ;; Check for Emacs version.
 (let ((x   (if (not (string-lessp emacs-version "24.4"))
       "ok"
-    (format "Tramp 2.4.2.2 is not fit for %s"
+    (format "Tramp 2.4.2.3 is not fit for %s"
             (replace-regexp-in-string "\n" "" (emacs-version))))))
   (unless (string-equal "ok" x) (error "%s" x)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]