(if (tramp-compat-string-search "=" elt)
(setq env (append env `(,elt)))
(setq uenv (cons elt uenv)))))
- (setenv-internal env "INSIDE_EMACS" (tramp-inside-emacs) 'keep)
+ (setq env (setenv-internal env "INSIDE_EMACS" (tramp-inside-emacs) 'keep))
(when env
(setq command
(format
proc timeout
(rx
(| (regexp shell-prompt-pattern) (regexp tramp-shell-prompt-pattern))
+ (? (regexp ansi-color-control-seq-regexp))
eos))
(error
(delete-process proc)
(when (cadr args)
(setq localname (and (stringp (cadr args)) (cadr args))))
(when hop
- (setq hop nil)
+ ;; Keep hop in file name for completion.
+ (unless minibuffer-completing-file-name
+ (setq hop nil))
;; Assure that the hops are in `tramp-default-proxies-alist'.
;; In tramp-archive.el, the slot `hop' is used for the archive
;; file name.
;; Obviously, the output was not complete.
(while (tramp-accept-process-output proc))
;; Remove ANSI control escape sequences.
- (with-current-buffer (tramp-get-connection-buffer vec)
+ (with-current-buffer (tramp-get-connection-buffer vec)
(goto-char (point-min))
(while (re-search-forward ansi-color-control-seq-regexp nil t)
(replace-match "")))
tramp-prefix-format hop
(substring-no-properties
method 0 (min 2 (length method))))
- ,(concat tramp-prefix-format method-string)
+ ,(concat tramp-prefix-format hop method-string)
,method-string)))
;; Complete user name.
(unless (tramp-string-empty-or-nil-p user)
(substring-no-properties
user 0 (min 2 (length user))))
,(concat
- tramp-prefix-format method-string user-string)
+ tramp-prefix-format hop method-string user-string)
,user-string)))
;; Complete host name.
(unless (tramp-string-empty-or-nil-p host)
(substring-no-properties
host 0 (min 2 (length host))))
(,(concat
- tramp-prefix-format method-string host-string)
+ tramp-prefix-format hop method-string host-string)
,(concat
- tramp-prefix-format method-string
+ tramp-prefix-format hop method-string
user-string host-string))
,host-string)))
;; Complete user and host name.
(substring-no-properties
host 0 (min 2 (length host))))
,(concat
- tramp-prefix-format method-string
+ tramp-prefix-format hop method-string
user-string host-string)
,host-string)))))