tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.2.13.25.1); Don't understand why prompt isn't recognized


From: Dave Abrahams
Subject: Re: tramp (2.2.13.25.1); Don't understand why prompt isn't recognized
Date: Wed, 19 Oct 2016 11:33:10 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin)

on Wed Oct 19 2016, Michael Albinus <michael.albinus-AT-gmx.de> wrote:

> Dave Abrahams <address@hidden> writes:
>
> Hi Dave,
>
>>>> Tramp just spins its little bar when trying to connect to a nearby
>>>> machine, and I can't tell why.
>>>>
>>>> [3. text/plain; tramp-buffer]
>>>>
>>>> Last login: Mon Oct 17 17:58:55 2016 from fe80::425:8609:c5f1:55a0%en3
>>>>
>>> ]1337;address@hidden;CurrentDir=/Users/dave]1337;ShellIntegrationVersion=3;shell=bash]133;C;]133;D;0]1337;address@hidden;CurrentDir=/Users/dave]133;AWingy:~
>>>> dave$ ]133;BKilled by signal 15.
>>>
>>> This is a very strange prompt; Tramp is likely to be confused by
>>> this.
>>
>> I didn't do anything explicit to set this prompt up, and I haven't
>> changed the prompt on the remote machine.  However, I have noticed that
>> ever since I upgraded to Emacs 25.1, I have seen similar very strange
>> looking prompts even from local `M-x shell' invocations within
>> emacs... although *that* doesn't seem to be reproducing now.
>
> The strings above are proprietary escape code sequences from iTerm2, see
> <https://www.iterm2.com/documentation-escape-codes.html>. Due to their
> proprietary nature, Emacs doesn't handle them.

Ach, you're a genius!  I'm sorry you had to figure that out for me.

>
> They don't seem to be part of the prompt (as I've suspected), but seem
> to be sent from your remote host during login. This must be suppressed
> at least on your remote host, and/or your local host.
>
>>> Pls change the prompt on your remote machine, the Tramp manual gives
>>> you some recipes.
>>
>> Some other weird thing is going on; when I connect to that machine from
>> a terminal window, what I see looks very normal.
>>
>> Skree:~ dave$ ssh wingy.local
>> Last login: Tue Oct 18 13:04:36 2016 from fe80::425:8609:c5f1:55a0%en3
>> Wingy:~ dave$
>> Wingy:~ dave$ logout
>> Connection to wingy.local closed.
>> Skree:~ dave$
>
> Likely, the escape codes are parsed internally only.
>
>> I don't see the recipes you're referring to in the TRAMP manual.  Do you
>> have a more specific pointer?
>
> The manual doesn't speak about iTerm2 in special. Well, likely you have
> in your remote ~/.profile (or ~/.bash_profile, ~/.login, whatever) a
> line like this:
>
> test -e "${HOME}/.iterm2_shell_integration.bash" && source 
> "${HOME}/.iterm2_shell_integration.bash"
>
> This must be suppressed. The Tramp Manual speaks about such techniques,
> see (info "(tramp) Frequently Asked Questions")
>
> Replace the line quoted above by something like
>
> [ $TERM = "dumb" ] || \
> test -e "${HOME}/.iterm2_shell_integration.bash" && \
> source "${HOME}/.iterm2_shell_integration.bash"

Good idea!

Thanks again, as usual.

-- 
-Dave



reply via email to

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