Subject: Re: bug#11065: 24.0.94; Problem with tramp & plink

From: Michael Albinus <[email-masked]>
Date: Thu, 22 Mar 2012 17:28:42 +0100

Dani Moncayo <[email-masked]> writes:

> Hello,

Hi Dani,

> From a cmd.exe console, I can login to a remote host using the command
> "plink my_host" and giving my credentials.  However, the remote host
> returns strange characters just before the the prompt text:
>
>   [Copyright messages and stuff...]
>
>   You have mail.
>           ←H        ←H        ←H        ←H        ←H        ←H
> ←H        ←H
>   [/home/my_user]

The default shell prompt pattern in Tramp does not recognizes "[]"
templates. You might change it by

(setq tramp-shell-prompt-pattern
      "\\(?:^\\|\\)[^#$%>\n]*#?[]#$%>] *\\(\\[[0-9;]*[a-zA-Z] *\\)*"

(Beware the ^M and ^[ characters)

> TIA.

Best regards, Michael.