Cannot handle linefeed correctly #4665

Closed
opened 2026-01-30 23:53:27 +00:00 by claunia · 3 comments
Owner

Originally created by @hez2010 on GitHub (Oct 26, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.418]
Windows Terminal version (if applicable): All

Steps to reproduce

  1. Write some characters with linefeed in the notepad, such as:
a
b
c
d
e
  1. Copy them
  2. Open Windows Terminal and launch WSL
wsl
  1. use cat command to write into a text file:
cat > test.txt << EOF
  1. Paste the copied characters into the terminal

Expected behavior

PS C:\Users\hez20> wsl
hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~
hez2010@DESKTOP-CD2C52F:~$ cat > test.txt << EOF
> a
> b
> c
> d
> e
> f

Actual behavior

PS C:\Users\hez20> wsl
hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~
hez2010@DESKTOP-CD2C52F:~$ cat > test.txt << EOF
> a
>
> b
>
> c
>
> d
>
> e
>
> f

Each linefeed was repeated twice.

Originally created by @hez2010 on GitHub (Oct 26, 2019). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.418] Windows Terminal version (if applicable): All ``` # Steps to reproduce 1. Write some characters with linefeed in the notepad, such as: ``` a b c d e ``` 2. Copy them 3. Open Windows Terminal and launch WSL ``` wsl ``` 4. use `cat` command to write into a text file: ``` cat > test.txt << EOF ``` 5. Paste the copied characters into the terminal # Expected behavior ``` PS C:\Users\hez20> wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat > test.txt << EOF > a > b > c > d > e > f ``` # Actual behavior ``` PS C:\Users\hez20> wsl hez2010@DESKTOP-CD2C52F:/mnt/c/Users/hez20$ cd ~ hez2010@DESKTOP-CD2C52F:~$ cat > test.txt << EOF > a > > b > > c > > d > > e > > f ``` Each linefeed was repeated twice.
claunia added the Resolution-Duplicate label 2026-01-30 23:53:27 +00:00
Author
Owner

@j4james commented on GitHub (Oct 26, 2019):

I think this is a duplicate of #1091.

@j4james commented on GitHub (Oct 26, 2019): I think this is a duplicate of #1091.
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 26, 2019):

It absolutely is a /dupe of #1091. Thanks, @j4james!

@DHowett-MSFT commented on GitHub (Oct 26, 2019): It absolutely is a /dupe of #1091. Thanks, @j4james!
Author
Owner

@ghost commented on GitHub (Oct 26, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Oct 26, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4665