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 10:15:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

"Loris Bennett" <address@hidden> writes:

> Hi,
>
> When logged in on a remote machine I have the following prompt:
>
>   [09:15:09] address@hidden (1000) ~
>   $ echo $PS1
>   \[\033]2;address@hidden address@hidden \[\e[36m\](\!) 
> \[\e[33m\]\w\[\e[34m\]\[\033[0m\]\n$
>
> When I access a file on the remote machine via TRAMP and then do 'M-x
> shell', I get:
>
>   ^[]2;address@hidden:42:03] address@hidden (30) ~
>   $ echo $PS1
>   \[\033]2;address@hidden address@hidden \[\e[36m\](\!) 
> \[\e[33m\]\w\[\e[34m\]\[\033[0m\]\n$
>
> where ^[ and ^G are the non-printable characters  and  respectively.
>
> I see that here:
>
>   https://www.gnu.org/software/tramp/#Remote-shell-setup
>
> the way to reset the prompt via ~/.emacs_SHELLNAME is described.
>
> 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?

Looking again I see that PS1 isn't changed, so the difference is
probably due to the way the prompt is interpreted by the terminal.

First I need to work out what the first instance of 'address@hidden' is there
for, as it's been a few years since I set it up.

-- 
This signature is currently under construction.


reply via email to

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