on Wed Oct 19 2016, Michael Albinus <michael.albinus-AT-gmx.de> wrote:
> Dave Abrahams <[email protected]> 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;[email protected]]1337;CurrentDir=/Users/dave]1337;ShellIntegrationVersion=3;shell=bash]133;C;]133;D;0]1337;[email protected]]1337;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 _______________________________________________ Tramp-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/tramp-devel
