-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Weird characters when pasting in WIndows Terminal #10572
Comments
Interesting report! This is caused by "bracketed paste mode" (see #395), which is only enabled after the shell/application deliberately asks the terminal to enable this feature. For more context, what is the shell you're using? |
I started a new shell tab window and it worked as expected so I can not reproduce it now.... |
skyline75489 is right, those characters are the bracketed paste sequences.
Well shucks. I'm gonna close this for now - if you run into a way to reliably reproduce this, feel free to comment here and we can reopen. |
I am seeing this exact same issue. |
One hacky workaround to disable bracketed paste in the current terminal (the one in which you'll be running the gcloud auth command) is to run: printf '\e[?2004l' And then the sequences |
I'm surprised this couldn't be reproduced. This has been a problem for me since day one of using the Terminal. It doesn't happen when using e.g. PowerShell or CMD through it, but any Linux shell will do that, unless you e.g. paste the text into emacs or the sorts. It also doesn't matter if it's the local Debian WSL or any Linux system accessed through ssh. Using Ctrl+Shift+V instead of using Ctrl+V as some recommend doesn't help, as I don't use anything else. And going to each systems ~/.inputrc to enter "set enable-bracketed-paste off" isn't really an option and shouldn't be the solution, as it very much seems to be a fault of the Terminal app. Maybe @zadjii-msft can re-open this issue, as it's very much reproducible and should finally be fixes after so many years. |
For me it only happens when I ssh into another linux server from WSL. |
I have the same issue when I paste with right click. I never had this issue with Putty, so it must be an issue with MS terminal. This issue should be re-opened. |
From a few days the same thing as @christosg88 has happened to me, via terminal with PowerShell I open an ssh session on remote linux machines and the paste has this behavior. |
Small update: I tried in terminal with WSL and it works, so surely the problem is not with terminal, but with openssh of powershell. |
Windows Terminal version (or Windows build number)
1.8.1521.0, 10.0.21390.2025
Other Software
No response
Steps to reproduce
When I run the following command in Ubuntu 20 from under Windows Terminal:
I'm getting the following input when pasting the key:
The command fails to process this input. I'm pasting the
<real pasted text>
but it is actually entered enveloped by^[[200~
and^[[201~
symbols.How to fix that?
Expected Behavior
Command works
Actual Behavior
Command fails
The text was updated successfully, but these errors were encountered: