"Christian Millour (AB TELA)" <[email protected]> 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="[...@\h \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.
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel