Can't echo correctly when pasting multiple lines to WSL 2 #12365

Closed
opened 2026-01-31 03:13:37 +00:00 by claunia · 6 comments
Owner

Originally created by @jiasli on GitHub (Feb 2, 2021).

Environment

> [Environment]::OSVersion

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.19042.0 Microsoft Windows NT 10.0.19042.0

Windows Terminal version (if applicable):
1.5.10271.0

Any other software?
WSL 2

Steps to reproduce

Paste multiple lines to Windows Terminal running WSL 2 and Ubuntu 18.04/20.04.

# test line 1
# test line 2
# test line 3
# test line 4

Expected behavior

Lines should be echoed line by line:

image

Actual behavior

The echoed text is corrupted.

image

The same issue also happens in Windows 10's built-in terminal.

image

Also VS Code Terminal:

image

Originally created by @jiasli on GitHub (Feb 2, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none > [Environment]::OSVersion Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 ``` Windows Terminal version (if applicable): 1.5.10271.0 Any other software? WSL 2 # Steps to reproduce Paste multiple lines to Windows Terminal running WSL 2 and Ubuntu 18.04/20.04. ``` # test line 1 # test line 2 # test line 3 # test line 4 ``` # Expected behavior Lines should be echoed line by line: ![image](https://user-images.githubusercontent.com/4003950/106602339-d13f8480-6597-11eb-96ab-418bacdf5bc6.png) # Actual behavior The echoed text is corrupted. ![image](https://user-images.githubusercontent.com/4003950/106602052-6ee68400-6597-11eb-80f0-6d8dc18a5eb1.png) The same issue also happens in Windows 10's built-in terminal. ![image](https://user-images.githubusercontent.com/4003950/106602123-87ef3500-6597-11eb-8483-a178d2b37af3.png) Also VS Code Terminal: ![image](https://user-images.githubusercontent.com/4003950/106603181-eec11e00-6598-11eb-8116-b726d9cf58de.png)
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2021):

Huh. That's the darndest thing - this doesn't repro for me on my 18.04 distro on WSL 1, but definitely does on my 20.04 running WSL 2. Sounds like it's definitely a WSL 2 issue. Let's move this to their repo.

@zadjii-msft commented on GitHub (Feb 2, 2021): Huh. That's the darndest thing - this doesn't repro for me on my 18.04 distro on WSL 1, but definitely does on my 20.04 running WSL 2. Sounds like it's definitely a WSL 2 issue. Let's move this to their repo.
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2021):

Moved to microsoft/WSL#6510

@zadjii-msft commented on GitHub (Feb 2, 2021): Moved to microsoft/WSL#6510
Author
Owner

@jiasli commented on GitHub (Feb 2, 2021):

Thanks @zadjii-msft for the quick response. Yes, WSL 1 works fine. I reported this issue here because I saw this statement when I was trying to raise an issue in WSL repo:

https://github.com/microsoft/WSL/issues/new?assignees=&labels=&template=bug_report.md&title=

If this is a console issue (a problem with layout, rendering, colors, etc.), please post the issue to the Terminal tracker: https://github.com/microsoft/terminal/issues

@jiasli commented on GitHub (Feb 2, 2021): Thanks @zadjii-msft for the quick response. Yes, WSL 1 works fine. I reported this issue here because I saw this statement when I was trying to raise an issue in WSL repo: https://github.com/microsoft/WSL/issues/new?assignees=&labels=&template=bug_report.md&title= > If this is a console issue (a problem with layout, rendering, colors, etc.), please post the issue to the Terminal tracker: https://github.com/microsoft/terminal/issues
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2021):

Yea, this is treading that blurry line. Considering this works fine in WSL1, I'm inclined to believe that it's a WSL2 issue. If they find out that it's actually on us, I'd be happy to reopen and fix it. Good thing their PM's office is just down the hall from us 😄

as if anyone's in offices anymore 😢

@zadjii-msft commented on GitHub (Feb 2, 2021): Yea, this is treading that blurry line. Considering this works fine in WSL1, I'm inclined to believe that it's a WSL2 issue. If they find out that it's actually on us, I'd be happy to reopen and fix it. Good thing their PM's office is just down the hall from us 😄 <sub> _as if anyone's in offices anymore 😢_ </sub>
Author
Owner

@jiasli commented on GitHub (Feb 2, 2021):

Nice! Let's stay tuned. I bumped into this issue while pasting multiple Azure CLI commands at the same time (e.g. to create a private DNS zone), becoming a "first-party victim". 🤣

@jiasli commented on GitHub (Feb 2, 2021): Nice! Let's stay tuned. I bumped into this issue while pasting multiple Azure CLI commands at the same time (e.g. to [create a private DNS zone](https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-cli#create-a-private-dns-zone)), becoming a "first-party victim". 🤣
Author
Owner

@jiasli commented on GitHub (Feb 3, 2021):

Facing the same issue while using ssh to connect to an Azure VM (in all of Windows Terminal, Windows 10 built-in terminal and VS Code):

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic

When pasting these lines into the terminal:

sleep 2
sleep 2
sleep 2

image

@jiasli commented on GitHub (Feb 3, 2021): Facing the same issue while using `ssh` to connect to an Azure VM (in all of Windows Terminal, Windows 10 built-in terminal and VS Code): ```sh $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic ``` When pasting these lines into the terminal: ``` sleep 2 sleep 2 sleep 2 ``` ![image](https://user-images.githubusercontent.com/4003950/106744074-35c31800-665a-11eb-9e32-0e98b1405532.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12365