/[tramp]/tramp/lisp/tramp.el
ViewVC logotype

Diff of /tramp/lisp/tramp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.182 by kai, Wed Aug 21 15:00:59 2002 UTC revision 2.183 by kai, Thu Aug 22 15:12:23 2002 UTC
# Line 104  Line 104 
104    "Edit remote files with a combination of rsh and rcp or similar programs."    "Edit remote files with a combination of rsh and rcp or similar programs."
105    :group 'files)    :group 'files)
106    
107  (defcustom tramp-verbose 10  (defcustom tramp-verbose 9
108    "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."    "*Verbosity level for tramp.el.  0 means be silent, 10 is most verbose."
109    :group 'tramp    :group 'tramp
110    :type 'integer)    :type 'integer)
# Line 699  The regexp should match at end of buffer Line 699  The regexp should match at end of buffer
699    :group 'tramp    :group 'tramp
700    :type 'regexp)    :type 'regexp)
701    
702    (defcustom tramp-shell-prompt-pattern
703      "^[^#$%>\n]*[#$%>] *"
704      "Regexp to match prompts from remote shell.
705    Normally, Tramp expects you to configure `shell-prompt-pattern'
706    correctly, but sometimes it happens that you are connecting to a
707    remote host which sends a different kind of shell prompt.  Therefore,
708    Tramp recognizes things matched by `shell-prompt-pattern' as prompt,
709    and also things matched by this variable.  The default value of this
710    variable is the same as the default value of `shell-prompt-pattern',
711    which should work well in many cases."
712      :group 'tramp
713      :type 'regexp)
714    
715  (defcustom tramp-password-prompt-regexp  (defcustom tramp-password-prompt-regexp
716    "^.*\\([pP]assword\\|passphrase.*\\):\^@? *"    "^.*\\([pP]assword\\|passphrase.*\\):\^@? *"
717    "*Regexp matching password-like prompts.    "*Regexp matching password-like prompts.
# Line 1070  but it might be slow on large directorie Line 1083  but it might be slow on large directorie
1083    '((tramp-password-prompt-regexp tramp-action-password)    '((tramp-password-prompt-regexp tramp-action-password)
1084      (tramp-login-prompt-regexp tramp-action-login)      (tramp-login-prompt-regexp tramp-action-login)
1085      (shell-prompt-pattern tramp-action-succeed)      (shell-prompt-pattern tramp-action-succeed)
1086        (tramp-shell-prompt-pattern tramp-action-succeed)
1087      (tramp-wrong-passwd-regexp tramp-action-permission-denied)      (tramp-wrong-passwd-regexp tramp-action-permission-denied)
1088      (tramp-yesno-prompt-regexp tramp-action-yesno)      (tramp-yesno-prompt-regexp tramp-action-yesno)
1089      (tramp-yn-prompt-regexp tramp-action-yn))      (tramp-yn-prompt-regexp tramp-action-yn))
# Line 1091  corresponding PATTERN matches, the ACTIO Line 1105  corresponding PATTERN matches, the ACTIO
1105    '((tramp-password-prompt-regexp tramp-multi-action-password)    '((tramp-password-prompt-regexp tramp-multi-action-password)
1106      (tramp-login-prompt-regexp tramp-multi-action-login)      (tramp-login-prompt-regexp tramp-multi-action-login)
1107      (shell-prompt-pattern tramp-multi-action-succeed)      (shell-prompt-pattern tramp-multi-action-succeed)
1108        (tramp-shell-prompt-pattern tramp-multi-action-succeed)
1109      (tramp-wrong-passwd-regexp tramp-multi-action-permission-denied))      (tramp-wrong-passwd-regexp tramp-multi-action-permission-denied))
1110    "List of pattern/action pairs.    "List of pattern/action pairs.
1111  This list is used for each hop in multi-hop connections.  This list is used for each hop in multi-hop connections.
# Line 3468  so, it is added to the environment varia Line 3483  so, it is added to the environment varia
3483  Here, we are looking for a command which has zero exit status if the  Here, we are looking for a command which has zero exit status if the
3484  file exists and nonzero exit status otherwise."  file exists and nonzero exit status otherwise."
3485    (make-local-variable 'tramp-file-exists-command)    (make-local-variable 'tramp-file-exists-command)
3486    (tramp-message 10 "Finding command to check if file exists")    (tramp-message 9 "Finding command to check if file exists")
3487    (let ((existing    (let ((existing
3488           (tramp-make-tramp-file-name           (tramp-make-tramp-file-name
3489            multi-method method user host            multi-method method user host
# Line 3540  file exists and nonzero exit status othe Line 3555  file exists and nonzero exit status othe
3555         (concat "PS1='$ ' exec " shell)) ;         (concat "PS1='$ ' exec " shell)) ;
3556        (unless (tramp-wait-for-regexp        (unless (tramp-wait-for-regexp
3557                 (get-buffer-process (current-buffer))                 (get-buffer-process (current-buffer))
3558                 60 (format "\\(\\$ *\\|\\(%s\\)\\)\\'" shell-prompt-pattern))                 60 (format "\\(\\(%s\\)\\|\\(%s\\)\\)\\'"
3559                              tramp-shell-prompt-pattern shell-prompt-pattern))
3560          (pop-to-buffer (buffer-name))          (pop-to-buffer (buffer-name))
3561          (error "Couldn't find remote `%s' prompt." shell))          (error "Couldn't find remote `%s' prompt." shell))
3562        (tramp-message        (tramp-message
3563         10 "Setting remote shell prompt...")         9 "Setting remote shell prompt...")
3564        (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"        (process-send-string nil (format "PS1='%s%s%s'; PS2=''; PS3=''%s"
3565                                         tramp-rsh-end-of-line                                         tramp-rsh-end-of-line
3566                                         tramp-end-of-output                                         tramp-end-of-output
# Line 3552  file exists and nonzero exit status othe Line 3568  file exists and nonzero exit status othe
3568                                         tramp-rsh-end-of-line))                                         tramp-rsh-end-of-line))
3569        (tramp-wait-for-output)        (tramp-wait-for-output)
3570        (tramp-message        (tramp-message
3571         10 "Setting remote shell prompt...done")         9 "Setting remote shell prompt...done")
3572  ;;       (tramp-send-command multi-method method user host "echo hello")  ;;       (tramp-send-command multi-method method user host "echo hello")
3573  ;;       (tramp-message 5 "Waiting for remote `%s' to start up..." shell)  ;;       (tramp-message 5 "Waiting for remote `%s' to start up..." shell)
3574  ;;       (unless (tramp-wait-for-output 5)  ;;       (unless (tramp-wait-for-output 5)
# Line 3715  See also `tramp-action-yesno'." Line 3731  See also `tramp-action-yesno'."
3731            (setq item (pop todo))            (setq item (pop todo))
3732            (setq pattern (symbol-value (nth 0 item)))            (setq pattern (symbol-value (nth 0 item)))
3733            (setq action (nth 1 item))            (setq action (nth 1 item))
3734            (tramp-message 10 "Looking for pattern %s" pattern)            (tramp-message 10 "Looking for regexp \"%s\" from remote shell"
3735                             pattern)
3736            (when (re-search-forward (concat pattern "\\'") nil t)            (when (re-search-forward (concat pattern "\\'") nil t)
3737              (setq found (funcall action p multi-method method user host)))))              (setq found (funcall action p multi-method method user host)))))
3738        found)))        found)))
# Line 3724  See also `tramp-action-yesno'." Line 3741  See also `tramp-action-yesno'."
3741    "Perform actions until success."    "Perform actions until success."
3742    (let (exit)    (let (exit)
3743      (while (not exit)      (while (not exit)
3744        (tramp-message 10 "Processing actions")        (tramp-message 9 "Waiting for prompts from remote shell")
3745        (setq exit        (setq exit
3746              (catch 'tramp-action              (catch 'tramp-action
3747                (tramp-process-one-action                (tramp-process-one-action
# Line 3750  See also `tramp-action-yesno'." Line 3767  See also `tramp-action-yesno'."
3767            (setq item (pop todo))            (setq item (pop todo))
3768            (setq pattern (symbol-value (nth 0 item)))            (setq pattern (symbol-value (nth 0 item)))
3769            (setq action (nth 1 item))            (setq action (nth 1 item))
3770            (tramp-message 10 "Looking for pattern %s" pattern)            (tramp-message 10 "Looking for regexp \"%s\" from remote shell"
3771                             pattern)
3772            (when (re-search-forward (concat pattern "\\'") nil t)            (when (re-search-forward (concat pattern "\\'") nil t)
3773              (setq found (funcall action p method user host)))))              (setq found (funcall action p method user host)))))
3774        found)))        found)))
# Line 3759  See also `tramp-action-yesno'." Line 3777  See also `tramp-action-yesno'."
3777    "Perform actions until success."    "Perform actions until success."
3778    (let (exit)    (let (exit)
3779      (while (not exit)      (while (not exit)
3780          (tramp-message 9 "Waiting for prompts from remote shell")
3781        (setq exit        (setq exit
3782              (catch 'tramp-action              (catch 'tramp-action
3783                (tramp-process-one-multi-action p method user host actions)                (tramp-process-one-multi-action p method user host actions)
# Line 3777  password to the remote host. Line 3796  password to the remote host.
3796    
3797  If USER is nil, uses value returned by `(user-login-name)' instead.  If USER is nil, uses value returned by `(user-login-name)' instead.
3798    
3799  Recognition of the remote shell prompt is based on the variable  Recognition of the remote shell prompt is based on the variables
3800  `shell-prompt-pattern' which must be set up correctly.  `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
3801    set up correctly.
3802    
3803  Please note that it is NOT possible to use this connection method  Please note that it is NOT possible to use this connection method
3804  together with an out-of-band transfer method!  You must use an inline  together with an out-of-band transfer method!  You must use an inline
# Line 3840  Maybe the different regular expressions Line 3860  Maybe the different regular expressions
3860  ;;         (tramp-message 9 "Waiting 30s for remote shell to come up...")  ;;         (tramp-message 9 "Waiting 30s for remote shell to come up...")
3861  ;;         (unless (setq found  ;;         (unless (setq found
3862  ;;                       (tramp-wait-for-regexp  ;;                       (tramp-wait-for-regexp
3863  ;;                        p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                        p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3864  ;;                                     tramp-wrong-passwd-regexp  ;;                                     tramp-wrong-passwd-regexp
3865  ;;                                     shell-prompt-pattern)))  ;;                                     shell-prompt-pattern
3866    ;;                                     tramp-shell-prompt-pattern)))
3867  ;;           (pop-to-buffer (buffer-name))  ;;           (pop-to-buffer (buffer-name))
3868  ;;           (kill-process p)  ;;           (kill-process p)
3869  ;;           (error "Couldn't find remote shell prompt"))  ;;           (error "Couldn't find remote shell prompt"))
# Line 3865  host and waits for a shell prompt. Line 3886  host and waits for a shell prompt.
3886    
3887  If USER is nil, start the command `rsh HOST'[*] instead  If USER is nil, start the command `rsh HOST'[*] instead
3888    
3889  Recognition of the remote shell prompt is based on the variable  Recognition of the remote shell prompt is based on the variables
3890  `shell-prompt-pattern' which must be set up correctly.  `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
3891    set up correctly.
3892    
3893  Please note that it is NOT possible to use this connection method with  Please note that it is NOT possible to use this connection method with
3894  an out-of-band transfer method if this function asks the user for a  an out-of-band transfer method if this function asks the user for a
# Line 3920  arguments, and xx will be used as the ho Line 3942  arguments, and xx will be used as the ho
3942  ;;               (tramp-wait-for-regexp  ;;               (tramp-wait-for-regexp
3943  ;;                p 60  ;;                p 60
3944  ;;                (format  ;;                (format
3945  ;;                 "\\(%s\\)\\|\\(%s\\)\\'"  ;;                 "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3946  ;;                 tramp-password-prompt-regexp  ;;                 tramp-password-prompt-regexp
3947  ;;                 shell-prompt-pattern)))  ;;                 shell-prompt-pattern tramp-shell-prompt-pattern)))
3948  ;;         (unless found  ;;         (unless found
3949  ;;           (pop-to-buffer (buffer-name))  ;;           (pop-to-buffer (buffer-name))
3950  ;;           (kill-process p)  ;;           (kill-process p)
# Line 3938  arguments, and xx will be used as the ho Line 3960  arguments, and xx will be used as the ho
3960  ;;           (tramp-message 9 "Sending password...")  ;;           (tramp-message 9 "Sending password...")
3961  ;;           (tramp-enter-password p (nth 1 found))  ;;           (tramp-enter-password p (nth 1 found))
3962  ;;           (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")  ;;           (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
3963  ;;           (setq found (tramp-wait-for-regexp p 60  ;;           (setq found (tramp-wait-for-regexp
3964  ;;                                              (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                        p 60
3965  ;;                                                      tramp-wrong-passwd-regexp  ;;                        (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
3966  ;;                                                      shell-prompt-pattern))))  ;;                                tramp-wrong-passwd-regexp
3967    ;;                                shell-prompt-pattern
3968    ;;                                tramp-shell-prompt-pattern))))
3969  ;;         (unless found  ;;         (unless found
3970  ;;           (pop-to-buffer (buffer-name))  ;;           (pop-to-buffer (buffer-name))
3971  ;;           (kill-process p)  ;;           (kill-process p)
# Line 3963  name must be equal to the local host nam Line 3987  name must be equal to the local host nam
3987    
3988  If USER is nil, uses value returned by user-login-name instead.  If USER is nil, uses value returned by user-login-name instead.
3989    
3990  Recognition of the remote shell prompt is based on the variable  Recognition of the remote shell prompt is based on the variables
3991  `shell-prompt-pattern' which must be set up correctly.  Note that the  `shell-prompt-pattern' and `tramp-shell-prompt-pattern' which must be
3992  other user may have a different shell prompt than you do, so it is not  set up correctly.  Note that the other user may have a different shell
3993  at all unlikely that this variable is set up wrongly!"  prompt than you do, so it is not at all unlikely that the variable
3994    `shell-prompt-pattern' is set up wrongly!"
3995    (save-match-data    (save-match-data
3996      (when (tramp-method-out-of-band-p multi-method method)      (when (tramp-method-out-of-band-p multi-method method)
3997        (error "Cannot use out-of-band method `%s' with `su' connection method"        (error "Cannot use out-of-band method `%s' with `su' connection method"
# Line 4006  at all unlikely that this variable is se Line 4031  at all unlikely that this variable is se
4031  ;;         (tramp-message 9 "Waiting 30s for shell or password prompt...")  ;;         (tramp-message 9 "Waiting 30s for shell or password prompt...")
4032  ;;         (unless (setq found (tramp-wait-for-regexp  ;;         (unless (setq found (tramp-wait-for-regexp
4033  ;;                              p 30  ;;                              p 30
4034  ;;                              (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                              (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4035  ;;                                      tramp-password-prompt-regexp  ;;                                      tramp-password-prompt-regexp
4036  ;;                                      shell-prompt-pattern)))  ;;                                      shell-prompt-pattern
4037    ;;                                      tramp-shell-prompt-pattern)))
4038  ;;           (pop-to-buffer (buffer-name))  ;;           (pop-to-buffer (buffer-name))
4039  ;;           (kill-process p)  ;;           (kill-process p)
4040  ;;           (error "Couldn't find shell or password prompt"))  ;;           (error "Couldn't find shell or password prompt"))
# Line 4020  at all unlikely that this variable is se Line 4046  at all unlikely that this variable is se
4046  ;;           (tramp-message 9 "Waiting 30s for remote shell to come up...")  ;;           (tramp-message 9 "Waiting 30s for remote shell to come up...")
4047  ;;           (unless (setq found  ;;           (unless (setq found
4048  ;;                         (tramp-wait-for-regexp  ;;                         (tramp-wait-for-regexp
4049  ;;                          p 30 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                          p 30 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4050  ;;                                       tramp-wrong-passwd-regexp  ;;                                       tramp-wrong-passwd-regexp
4051  ;;                                       shell-prompt-pattern)))  ;;                                       shell-prompt-pattern
4052    ;;                                       tramp-shell-prompt-pattern)))
4053  ;;             (pop-to-buffer (buffer-name))  ;;             (pop-to-buffer (buffer-name))
4054  ;;             (kill-process p)  ;;             (kill-process p)
4055  ;;             (error "Couldn't find remote shell prompt"))  ;;             (error "Couldn't find remote shell prompt"))
# Line 4080  log in as u2 to h2." Line 4107  log in as u2 to h2."
4107          (process-kill-without-query p)          (process-kill-without-query p)
4108          (tramp-message 9 "Waiting 60s for local shell to come up...")          (tramp-message 9 "Waiting 60s for local shell to come up...")
4109          (unless (tramp-wait-for-regexp          (unless (tramp-wait-for-regexp
4110                   p 60 (format "%s\\'" shell-prompt-pattern))                   p 60 (format "\\(%s\\)\\'\\|\\(%s\\)\\'"
4111                                  shell-prompt-pattern tramp-shell-prompt-pattern))
4112            (pop-to-buffer (buffer-name))            (pop-to-buffer (buffer-name))
4113            (kill-process p)            (kill-process p)
4114            (error "Couldn't find local shell prompt"))            (error "Couldn't find local shell prompt"))
# Line 4144  If USER is nil, uses the return value of Line 4172  If USER is nil, uses the return value of
4172  ;;     (process-send-string p (concat pw tramp-rsh-end-of-line))  ;;     (process-send-string p (concat pw tramp-rsh-end-of-line))
4173  ;;     (tramp-message 9 "Waiting 60s for remote shell to come up...")  ;;     (tramp-message 9 "Waiting 60s for remote shell to come up...")
4174  ;;     (unless (setq found (tramp-wait-for-regexp  ;;     (unless (setq found (tramp-wait-for-regexp
4175  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4176  ;;                                       tramp-wrong-passwd-regexp  ;;                                       tramp-wrong-passwd-regexp
4177  ;;                                       shell-prompt-pattern)))  ;;                                       shell-prompt-pattern
4178    ;;                                       tramp-shell-prompt-pattern)))
4179  ;;       (pop-to-buffer (buffer-name))  ;;       (pop-to-buffer (buffer-name))
4180  ;;       (kill-process p)  ;;       (kill-process p)
4181  ;;       (error "Couldn't find shell prompt from host %s" host))  ;;       (error "Couldn't find shell prompt from host %s" host))
# Line 4184  If USER is nil, uses the return value of Line 4213  If USER is nil, uses the return value of
4213  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt from %s" host)
4214  ;;     (unless (setq found  ;;     (unless (setq found
4215  ;;                   (tramp-wait-for-regexp p 60  ;;                   (tramp-wait-for-regexp p 60
4216  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4217  ;;                                                tramp-password-prompt-regexp  ;;                                                tramp-password-prompt-regexp
4218  ;;                                                shell-prompt-pattern)))  ;;                                                shell-prompt-pattern
4219    ;;                                                tramp-shell-prompt-pattern)))
4220  ;;       (pop-to-buffer (buffer-name))  ;;       (pop-to-buffer (buffer-name))
4221  ;;       (kill-process p)  ;;       (kill-process p)
4222  ;;       (error "Couldn't find remote shell or passwd prompt"))  ;;       (error "Couldn't find remote shell or passwd prompt"))
# Line 4196  If USER is nil, uses the return value of Line 4226  If USER is nil, uses the return value of
4226  ;;       (tramp-enter-password p (nth 1 found))  ;;       (tramp-enter-password p (nth 1 found))
4227  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
4228  ;;       (setq found (tramp-wait-for-regexp p 60  ;;       (setq found (tramp-wait-for-regexp p 60
4229  ;;                                          (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                                          (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4230  ;;                                                  tramp-wrong-passwd-regexp  ;;                                                  tramp-wrong-passwd-regexp
4231  ;;                                                  shell-prompt-pattern))))  ;;                                                  shell-prompt-pattern
4232    ;;                                                  tramp-shell-prompt-pattern))))
4233  ;;     (unless found  ;;     (unless found
4234  ;;       (pop-to-buffer (buffer-name))  ;;       (pop-to-buffer (buffer-name))
4235  ;;       (kill-process p)  ;;       (kill-process p)
# Line 4237  character." Line 4268  character."
4268                                   tramp-multi-actions)                                   tramp-multi-actions)
4269  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or user (user-login-name)))  ;;     (tramp-message 9 "Waiting 60s for shell or passwd prompt for %s" (or user (user-login-name)))
4270  ;;     (unless (setq found (tramp-wait-for-regexp  ;;     (unless (setq found (tramp-wait-for-regexp
4271  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                          p 60 (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4272  ;;                                       tramp-password-prompt-regexp  ;;                                       tramp-password-prompt-regexp
4273  ;;                                       shell-prompt-pattern)))  ;;                                       shell-prompt-pattern
4274    ;;                                       tramp-shell-prompt-pattern)))
4275  ;;       (pop-to-buffer (buffer-name))  ;;       (pop-to-buffer (buffer-name))
4276  ;;       (kill-process p)  ;;       (kill-process p)
4277  ;;       (error "Couldn't find shell or passwd prompt for %s"  ;;       (error "Couldn't find shell or passwd prompt for %s"
# Line 4250  character." Line 4282  character."
4282  ;;       (erase-buffer)  ;;       (erase-buffer)
4283  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")  ;;       (tramp-message 9 "Sent password, waiting 60s for remote shell prompt")
4284  ;;       (setq found (tramp-wait-for-regexp p 60  ;;       (setq found (tramp-wait-for-regexp p 60
4285  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\'"  ;;                                        (format "\\(%s\\)\\|\\(%s\\)\\|\\(%s\\)\\'"
4286  ;;                                                tramp-wrong-passwd-regexp  ;;                                                tramp-wrong-passwd-regexp
4287  ;;                                                shell-prompt-pattern))))  ;;                                                shell-prompt-pattern
4288    ;;                                                tramp-shell-prompt-pattern))))
4289  ;;     (unless found  ;;     (unless found
4290  ;;       (pop-to-buffer (buffer-name))  ;;       (pop-to-buffer (buffer-name))
4291  ;;       (kill-process p)  ;;       (kill-process p)
# Line 4350  to set up.  METHOD, USER and HOST specif Line 4383  to set up.  METHOD, USER and HOST specif
4383    (tramp-message 9 "Waiting 30s for remote `%s' to come up..."    (tramp-message 9 "Waiting 30s for remote `%s' to come up..."
4384                 (tramp-get-remote-sh multi-method method))                 (tramp-get-remote-sh multi-method method))
4385    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4386             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4387                            shell-prompt-pattern tramp-shell-prompt-pattern))
4388      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4389      (error "Remote `%s' didn't come up.  See buffer `%s' for details"      (error "Remote `%s' didn't come up.  See buffer `%s' for details"
4390             (tramp-get-remote-sh multi-method method) (buffer-name)))             (tramp-get-remote-sh multi-method method) (buffer-name)))
# Line 4359  to set up.  METHOD, USER and HOST specif Line 4393  to set up.  METHOD, USER and HOST specif
4393    (process-send-string    (process-send-string
4394     nil (format "stty -inlcr -echo kill '^U'%s" tramp-rsh-end-of-line))     nil (format "stty -inlcr -echo kill '^U'%s" tramp-rsh-end-of-line))
4395    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4396             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4397                            shell-prompt-pattern tramp-shell-prompt-pattern))
4398      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4399      (error "Couldn't `stty -echo', see buffer `%s'" (buffer-name)))      (error "Couldn't `stty -echo', see buffer `%s'" (buffer-name)))
4400    (erase-buffer)    (erase-buffer)
4401    (process-send-string nil (format "TERM=dumb; export TERM%s"    (process-send-string nil (format "TERM=dumb; export TERM%s"
4402                                     tramp-rsh-end-of-line))                                     tramp-rsh-end-of-line))
4403    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4404             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4405                            shell-prompt-pattern tramp-shell-prompt-pattern))
4406      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4407      (error "Couldn't `TERM=dumb; export TERM', see buffer `%s'" (buffer-name)))      (error "Couldn't `TERM=dumb; export TERM', see buffer `%s'" (buffer-name)))
4408    ;; Try to set up the coding system correctly.    ;; Try to set up the coding system correctly.
# Line 4377  to set up.  METHOD, USER and HOST specif Line 4413  to set up.  METHOD, USER and HOST specif
4413      (process-send-string nil (format "echo foo ; echo bar %s"      (process-send-string nil (format "echo foo ; echo bar %s"
4414                                       tramp-rsh-end-of-line))                                       tramp-rsh-end-of-line))
4415      (unless (tramp-wait-for-regexp      (unless (tramp-wait-for-regexp
4416               p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))               p 30 (format "\\(%s\\|%s\\)\\'"
4417                              shell-prompt-pattern tramp-shell-prompt-pattern))
4418        (pop-to-buffer (buffer-name))        (pop-to-buffer (buffer-name))
4419        (error "Couldn't `echo foo; echo bar' to determine line endings'"))        (error "Couldn't `echo foo; echo bar' to determine line endings'"))
4420      (goto-char (point-min))      (goto-char (point-min))
# Line 4405  to set up.  METHOD, USER and HOST specif Line 4442  to set up.  METHOD, USER and HOST specif
4442          (tramp-message 9 "Trying `stty -onlcr'")          (tramp-message 9 "Trying `stty -onlcr'")
4443          (process-send-string nil (format "stty -onlcr%s" tramp-rsh-end-of-line))          (process-send-string nil (format "stty -onlcr%s" tramp-rsh-end-of-line))
4444          (unless (tramp-wait-for-regexp          (unless (tramp-wait-for-regexp
4445                   p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))                   p 30 (format "\\(%s\\|%s\\)\\'"
4446                                  shell-prompt-pattern tramp-shell-prompt-pattern))
4447            (pop-to-buffer (buffer-name))            (pop-to-buffer (buffer-name))
4448            (error "Couldn't `stty -onlcr', see buffer `%s'" (buffer-name))))))            (error "Couldn't `stty -onlcr', see buffer `%s'" (buffer-name))))))
4449    (erase-buffer)    (erase-buffer)
# Line 4415  to set up.  METHOD, USER and HOST specif Line 4453  to set up.  METHOD, USER and HOST specif
4453     nil (format "HISTFILE=$HOME/.tramp_history; HISTSIZE=1%s"     nil (format "HISTFILE=$HOME/.tramp_history; HISTSIZE=1%s"
4454                 tramp-rsh-end-of-line))                 tramp-rsh-end-of-line))
4455    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4456             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4457                            shell-prompt-pattern tramp-shell-prompt-pattern))
4458      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4459      (error (concat "Couldn't `HISTFILE=$HOME/.tramp_history; "      (error (concat "Couldn't `HISTFILE=$HOME/.tramp_history; "
4460                     "HISTSIZE=1', see buffer `%s'")                     "HISTSIZE=1', see buffer `%s'")
# Line 4426  to set up.  METHOD, USER and HOST specif Line 4465  to set up.  METHOD, USER and HOST specif
4465     nil (format "set +o vi +o emacs%s"      ;mustn't `>/dev/null' with AIX?     nil (format "set +o vi +o emacs%s"      ;mustn't `>/dev/null' with AIX?
4466                 tramp-rsh-end-of-line))                 tramp-rsh-end-of-line))
4467    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4468             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4469                            shell-prompt-pattern tramp-shell-prompt-pattern))
4470      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4471      (error "Couldn't `set +o vi +o emacs', see buffer `%s'"      (error "Couldn't `set +o vi +o emacs', see buffer `%s'"
4472             (buffer-name)))             (buffer-name)))
# Line 4436  to set up.  METHOD, USER and HOST specif Line 4476  to set up.  METHOD, USER and HOST specif
4476     nil (format "unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null%s"     nil (format "unset MAIL MAILCHECK MAILPATH 1>/dev/null 2>/dev/null%s"
4477                 tramp-rsh-end-of-line))                 tramp-rsh-end-of-line))
4478    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4479             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4480                            shell-prompt-pattern tramp-shell-prompt-pattern))
4481      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4482      (error "Couldn't `unset MAIL MAILCHECK MAILPATH', see buffer `%s'"      (error "Couldn't `unset MAIL MAILCHECK MAILPATH', see buffer `%s'"
4483             (buffer-name)))             (buffer-name)))
# Line 4445  to set up.  METHOD, USER and HOST specif Line 4486  to set up.  METHOD, USER and HOST specif
4486    (process-send-string    (process-send-string
4487     nil (format "unset CDPATH%s" tramp-rsh-end-of-line))     nil (format "unset CDPATH%s" tramp-rsh-end-of-line))
4488    (unless (tramp-wait-for-regexp    (unless (tramp-wait-for-regexp
4489             p 30 (format "\\(\\$ *\\|%s\\)\\'" shell-prompt-pattern))             p 30 (format "\\(%s\\|%s\\)\\'"
4490                            shell-prompt-pattern tramp-shell-prompt-pattern))
4491      (pop-to-buffer (buffer-name))      (pop-to-buffer (buffer-name))
4492      (error "Couldn't `unset CDPATH', see buffer `%s'"      (error "Couldn't `unset CDPATH', see buffer `%s'"
4493             (buffer-name)))             (buffer-name)))
# Line 4699  Goes through the list `tramp-coding-comm Line 4741  Goes through the list `tramp-coding-comm
4741            ;; remotely with null input and output.  This makes sure there            ;; remotely with null input and output.  This makes sure there
4742            ;; are no syntax errors and the command is really found.            ;; are no syntax errors and the command is really found.
4743            (tramp-message-for-buffer            (tramp-message-for-buffer
4744             multi-method method user host 10             multi-method method user host 9
4745             "Checking remote encoding command `%s' for sanity" ec)             "Checking remote encoding command `%s' for sanity" ec)
4746            (unless (zerop (tramp-send-command-and-check            (unless (zerop (tramp-send-command-and-check
4747                            multi-method method user host                            multi-method method user host
4748                            (format "%s </dev/null >/dev/null" ec) t))                            (format "%s </dev/null >/dev/null" ec) t))
4749              (throw 'wont-work nil))              (throw 'wont-work nil))
4750            (tramp-message-for-buffer            (tramp-message-for-buffer
4751             multi-method method user host 10             multi-method method user host 9
4752             "Checking remote decoding command `%s' for sanity" dc)             "Checking remote decoding command `%s' for sanity" dc)
4753            (unless (zerop (tramp-send-command-and-check            (unless (zerop (tramp-send-command-and-check
4754                            multi-method method user host                            multi-method method user host
# Line 4717  Goes through the list `tramp-coding-comm Line 4759  Goes through the list `tramp-coding-comm
4759            ;; locally.            ;; locally.
4760            (when (not (fboundp ef))            (when (not (fboundp ef))
4761              (tramp-message-for-buffer              (tramp-message-for-buffer
4762               multi-method method user host 10               multi-method method user host 9
4763               "Checking local encoding command `%s' for sanity" ec)               "Checking local encoding command `%s' for sanity" ec)
4764              (unless (zerop (call-process              (unless (zerop (call-process
4765                              tramp-sh-program ;program                              tramp-sh-program ;program
# Line 4729  Goes through the list `tramp-coding-comm Line 4771  Goes through the list `tramp-coding-comm
4771                (throw 'wont-work nil)))                (throw 'wont-work nil)))
4772            (when (not (fboundp df))            (when (not (fboundp df))
4773              (tramp-message-for-buffer              (tramp-message-for-buffer
4774               multi-method method user host 10               multi-method method user host 9
4775               "Checking local decoding command `%s' for sanity" dc)               "Checking local decoding command `%s' for sanity" dc)
4776              (unless (zerop (call-process              (unless (zerop (call-process
4777                              tramp-sh-program ;program                              tramp-sh-program ;program
# Line 5711  Only works for Bourne-like shells." Line 5753  Only works for Bourne-like shells."
5753         tramp-actions-before-shell         tramp-actions-before-shell
5754         tramp-multi-actions         tramp-multi-actions
5755         tramp-terminal-type         tramp-terminal-type
5756           tramp-shell-prompt-pattern
5757    
5758         ;; Non-tramp variables of interest         ;; Non-tramp variables of interest
5759         shell-prompt-pattern         shell-prompt-pattern

Legend:
Removed from v.2.182  
changed lines
  Added in v.2.183

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26