help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [TRAMP] Setting remote prompt


From: Loris Bennett
Subject: Re: [TRAMP] Setting remote prompt
Date: Tue, 24 Apr 2018 11:29:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Michael,

Michael Albinus <michael.albinus@gmx.de> writes:

> "Loris Bennett" <loris.bennett@fu-berlin.de> writes:
>
>> Hi,
>
> Hi Loris,
>
>> However, I was wondering if there is just a simple way to prevent TRAMP
>> from adding a default prompt to the front of the existing prompt (if,
>> indeed, that is what is happening).
>>
>> Does anyone one have any advice?
>
> I'm not aware that Tramp sets this prompt as you have shown. Maybe you
> run your test with tramp-verbose being 6, and check Tramp's debug
> buffer. Tramp sets PS1, but not the way it happens to you.

Yes, you are right.  The problem is that I have PROMPT_COMMAND set to a
function that exports PS1.  I had fixed the problem but not propagated
the solution to all other machines.  The correct prompt looks like this:

  \[\e[35m\][\t] \[\e[32m\]\u@\h \[\e[36m\](\!) 
\[\e[33m\]\w\[\e[34m\]\[\033[0m\]\n$

The extraneous symbols were coming from the following fragment

  \[\033]2;\u@\h\a\]

which seems to be some sort of attempt to use the text attribute "dim"
(2;), which is ignored or not displayed for most of my terminals, but
produces

  ^[]2;loris@pi^G

when the shell is run with Emacs.

Sorry for the noise.

Cheers,

Loris

-- 
This signature is currently under construction.


reply via email to

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