From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Loris Bennett" Newsgroups: gmane.emacs.help Subject: Re: [TRAMP] Setting remote prompt Date: Tue, 24 Apr 2018 11:29:40 +0200 Organization: Freie Universitaet Berlin Message-ID: <87muxtgdff.fsf@hornfels.zedat.fu-berlin.de> References: <87vachghmp.fsf@hornfels.zedat.fu-berlin.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524562106 11452 195.159.176.226 (24 Apr 2018 09:28:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Apr 2018 09:28:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 24 11:28:22 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fAuFK-0002tZ-N1 for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Apr 2018 11:28:22 +0200 Original-Received: from localhost ([::1]:57358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAuHR-0005OU-Hp for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Apr 2018 05:30:33 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 46 Original-X-Trace: news.uni-berlin.de 7mjGm/tXj+GjeeGX3CyICgusex+45i4mVP/nMaJ83GQNdS Cancel-Lock: sha1:RWCpYQlbe6ANUDMyHnmmt9ha8gI= Original-Xref: usenet.stanford.edu gnu.emacs.help:222470 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116588 Archived-At: Hi Michael, Michael Albinus writes: > "Loris Bennett" 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.