MM <[email protected]> writes:

> A copy paste from the .emacs buffer, in case a missing char somewhere:
> (this email is in Plain text mode)
>
> (require 'tramp)
> (require 'tramp-sh)
> (defconst my-tramp-prompt-regexp
>   (concat (regexp-quote "Host:") "\\s-*")
>   "Regular expression matching my login prompt question.")
>
> (defun my-tramp-action (proc vec)
>   "Enter the host name in order to give a correct answer."
>   (save-window-excursion
>     (with-current-buffer (tramp-get-connection-buffer vec)
>       (tramp-message vec 6 "\n%s" (buffer-string))
>       (tramp-send-string vec "hostname"))))
>
> (eval-after-load "tramp-sh"
>  (add-to-list 'tramp-actions-before-shell
>               '(my-tramp-prompt-regexp my-tramp-action)))

Try this one:

(eval-after-load "tramp-sh"
  '(add-to-list 'tramp-actions-before-shell
                '(my-tramp-prompt-regexp my-tramp-action)))

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to