cuspymd / tramp-term.el

Provides a quick way to create an ansi-term containing an ssh session with remote directory tracking already configured.
43 stars 12 forks source link

Prints nSiTU $USERNAME #6

Closed computersarecool closed 7 years ago

computersarecool commented 7 years ago

When using tramp term and performing shell commands I constantly see nSiTu followed by my username.

For instance:

username@raspberry/usr/bin/tightvncserver -kill :2                                                                                                                                      
Killing Xtightvnc process ID 17565                                                                                                                                                             
nSiTu username                                                                                                                                                                                  
username@raspberrypi~ ()$       

It's possible this is on my end but I don't see this when I use SSH and Emacs from ANSI-term

randymorris commented 7 years ago

I've seen this in the past as well with both tramp-term and just the snippets from the emacs wiki that tramp-term is based on. That string is part of the escape sequences that are used under the hood to set the username/host/directory variables that are then used to generate a tramp compatible filename. It seems that sometimes ansi-term doesn't fully interpret the escape sequences sometimes (the full escape sequence there is "AnSiTu", not just "nSiTu"). The reason you see it after every command is because these escape sequences are printed before the prompt is drawn by taking over bash's PROMPT_COMMAND.

I haven't been able to reproduce this consistently, but I would imagine the issue would be somewhere in ansi-term rather than tramp-term. The code that prints these escape sequences is pretty straightforward, not much we can do differently on this side.

computersarecool commented 7 years ago

Makes sense to me.