tramp-devel
[Top][All Lists]
Advanced

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

Re: Strange prompt in tramp remote shell


From: Michael Albinus
Subject: Re: Strange prompt in tramp remote shell
Date: Wed, 03 Nov 2010 14:34:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

"Christian Millour (AB TELA)" <address@hidden> writes:

> Hello,

Hi,

> I don't know whether this is a tramp issue or a shell(.el) issue, but I 
> am getting a strange prompt when running a remote shell using plink from 
> ntemacs on Win7 to a remote linux host. It looks like the prompt is set 
> to the value of tamp-end-of-output as defvar'd in tramp.el.

Yes, it is Tramp. It redefines the prompt immediately after opening a
remote shell, in order to use robust regexs for parsing. In the logic of
connecting, there is no simple way to change this.

> One workaround for not having to reset the prompt manually for each 
> session is to (setenv "ESHELL" "bash") in the .emacs and create a 
> .emacs_bash containing
>
> # reset the prompt for remote tramp shells
> if [ "${INSIDE_EMACS/*tramp*/tramp}" == "tramp" ]; then PS1="address@hidden 
> \w]$ 
> ";fi
>
> I wonder is there might be a cleaner way.

That looks like a reasonable handling of the problem. The variable
$INSIDE_EMACS is set exactly for the purpose to give the user a chance
to react on Tramp specifics. And you do.

If you do not object, I will add your recipe to Tramp's FAQ.

> TIA, and best regards,

Thanks, and best regards, Michael.



reply via email to

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