From: "Loris Bennett" <loris.bennett@fu-berlin.de>
To: help-gnu-emacs@gnu.org
Subject: Re: [TRAMP] Setting remote prompt
Date: Tue, 24 Apr 2018 11:29:40 +0200 [thread overview]
Message-ID: <87muxtgdff.fsf@hornfels.zedat.fu-berlin.de> (raw)
In-Reply-To: mailman.12922.1524557662.27995.help-gnu-emacs@gnu.org
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.
next prev parent reply other threads:[~2018-04-24 9:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 7:58 [TRAMP] Setting remote prompt Loris Bennett
2018-04-24 8:14 ` Michael Albinus
2018-04-24 8:15 ` Loris Bennett
2018-04-24 8:56 ` Yuri Khan
[not found] ` <mailman.12925.1524560224.27995.help-gnu-emacs@gnu.org>
2018-04-24 9:50 ` Loris Bennett
[not found] ` <mailman.12922.1524557662.27995.help-gnu-emacs@gnu.org>
2018-04-24 9:29 ` Loris Bennett [this message]
2018-04-24 10:35 ` Ben Bacarisse
2018-04-24 10:35 ` Ben Bacarisse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87muxtgdff.fsf@hornfels.zedat.fu-berlin.de \
--to=loris.bennett@fu-berlin.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).