emacs-libvterm icon indicating copy to clipboard operation
emacs-libvterm copied to clipboard

Directory tracking not working with mosh

Open greened opened this issue 5 years ago • 7 comments

I've been using emacs-libvterm successfully for a while with ssh. Recently I tried mosh and suddenly remote directory tracking doesn't work. find-file doesn't recognize that I'm on a remote host and doesn't present a TRAMP remote path. I have not changed my prompt.

I'm pretty sure this isn't a libvterm problem per se, but I'm not sure how to go about diagnosing the issue. Any suggestions?

greened avatar Nov 23 '20 02:11 greened

Directory tracking has to be configured on the remote server as well. To do this, you have to print out your username, hostname, and folder with the escape code 51;A. This is the same for (ansi-)term, so if you find some examples for that, it should work here as well.

Sbozzolo avatar Nov 24 '20 00:11 Sbozzolo

I have done all that and it works great with ssh. Switching to mosh causes it to fail.

greened avatar Nov 24 '20 01:11 greened

Sorry, my bad. I got confused about what mosh is. A quick search brings me to this PR: https://github.com/mobile-shell/mosh/issues/637 This would add support to OSC 51 (I think), which is what we need.

Sbozzolo avatar Nov 24 '20 01:11 Sbozzolo

Doesn't that issue talk aabout OSC 52, not 51?

I also filed an issue with mosh about this and will update it with your information. Thanks!

greened avatar Nov 24 '20 14:11 greened

Yes, the issue is for OSC 52, but (very) quickly looking at the code in the first post my impression is that other OSC would be implemented as well.

On Tue, Nov 24, 2020 at 7:36 AM David Greene [email protected] wrote:

Doesn't that issue talk aabout OSC 52, not 51?

I also filed and issue https://github.com/mobile-shell/mosh/issues/1122 with mosh about this and will update it with your information. Thanks!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/akermu/emacs-libvterm/issues/454#issuecomment-733013620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACF6E7MSX5XU2EHW53F3YLDSRPAFNANCNFSM4T64VAIQ .

Sbozzolo avatar Nov 24 '20 17:11 Sbozzolo

I'm going to try to take a crack at implementing it in mosh.

greened avatar Nov 24 '20 17:11 greened

And...I got stuck right away. I took the existing patch in mobile-shell/mosh#637 but like the author, don't know how to actually send the OSC through to the terminal.

greened avatar Nov 24 '20 19:11 greened