-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange character sequences (ANSI escape sequences?) leaking into shell prompt when starting/attaching Tmux #2275
Comments
Please also note that there are already a lot of related issues/reports but not in this repository.
Some links to the reports that I found:
Other relevant links:
So my conclusions are the following:
|
On |
Thanks for the additional data @yoctozepto! :) I think it's the combination of the terminal and OpenSSH for Windows but that the actual bug is in OpenSSH for Windows and the terminal only matters as it will affect the response to tmux's I did run two additional tests yesterday:
To be sure I did another test today via Ubuntu 24.04 LTS in WSL 2: I installed and started
PS: I can also trigger the bug with
|
OK, so it truly is the Win32-OpenSSH - that is the common denominator here. It needs certain conditions to happen but it does not happen without it. |
Prerequisites
Steps to reproduce
Connect to a Linux/Unix host via
ssh
and attach to atmux
session. Strangely the results seem to differ based on the target OS, e.g.:61;6;7;21;22;23;24;28;32;42c
(basically every time)0;10;1c
but only on every third/fourth attempt or soExpected behavior
I can attach to my Tmux session and it looks exactly as I left it.
This usually means that the last line of the active Tmux window/pane contains a empty shell prompt like this:
Actual behavior
I get some additional random characters ("garbage") behind the prompt, e.g.:
Error details
No response
Environment data
I am using the Windows Terminal and it doesn't matter if I uses the "Windows PowerShell", "Command Prompt", or "Git Bash". When I use "Git Bash" via "Windows Terminal" everything works as expected with
/usr/bin/ssh
(OpenSSH_9.7p1, OpenSSL 3.2.1 30 Jan 2024) but not with/c/Program\ Files/OpenSSH/ssh
(OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2) which is why I came to the conclusion that this seems to be a OpenSSH for Windows bug. The second indication that this seems to be an OpenSSH for Windows bug is that I didn't get those unexpected character sequence withSSH_TERM_CONHOST_PARSER=0
(but that also makes the rendering much much slower and I get significant visual glitches like a green background color (probably due to the status line background color from tmux)).Anyway, here is the desired output but I don't expect it to be relevant in this case:
Version
OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
Visuals
No response
The text was updated successfully, but these errors were encountered: