Terminal breaks copied text at window line wraps on fish-shell command. #21421

Closed
opened 2026-01-31 07:44:13 +00:00 by claunia · 3 comments
Owner

Originally created by @youralmight on GitHub (Mar 20, 2024).

Windows Terminal version

1.19.10573.0

Windows build number

10.0.22631.0

Other Software

WSL Ubuntu-22.04
fish shell 3.3.1

Steps to reproduce

  1. open windows terminal and launch WSL Ubuntu-22.04.
  2. fish shell is launched.
  3. input some long command such as "echo 11111111111111111111111111111111111111111111111111111111111111111111111111111111111" so the command wraps.
  4. use the mouse to select the command.
  5. hit "ctrl+shift+c" to copy the selected command.
  6. paste it into any editor to see the result.

image

Expected Behavior

The command is pasted correctly including no line break.

Actual Behavior

Line breaks are inserted at the wrap points.

I tested on bash command, colored bash output, fish command and colored fish command to find that this bug only shows when I am using fish-shell and the copied content is a command. I am also posting the issue to fish-shell.

Originally created by @youralmight on GitHub (Mar 20, 2024). ### Windows Terminal version 1.19.10573.0 ### Windows build number 10.0.22631.0 ### Other Software WSL Ubuntu-22.04 fish shell 3.3.1 ### Steps to reproduce 1. open windows terminal and launch WSL Ubuntu-22.04. 2. fish shell is launched. 3. input some long command such as "echo 11111111111111111111111111111111111111111111111111111111111111111111111111111111111" so the command wraps. 4. use the mouse to select the command. 5. hit "ctrl+shift+c" to copy the selected command. 6. paste it into any editor to see the result. ![image](https://github.com/microsoft/terminal/assets/42952005/d9041d3b-9272-4849-a0ca-b9657acec5aa) ### Expected Behavior The command is pasted correctly including no line break. ### Actual Behavior Line breaks are inserted at the wrap points. I tested on bash command, colored bash output, fish command and colored fish command to find that this bug only shows when I am using fish-shell and the copied content is a command. I am also posting the issue to fish-shell.
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:44:13 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 20, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Mar 20, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Terminal breaks copied text at window line wraps, even when the text has no new-line characters (#5113)](https://github.com/microsoft/terminal/issues/5113), similarity score: 0.77 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@youralmight commented on GitHub (Mar 20, 2024):

This issue is not an issue of Windows Terminal but of fish-shell. Fish shell treats its output differently from bash. https://github.com/fish-shell/fish-shell/issues/10384
This conflict between fish-shell feature and select-and-copy with mouse seems unsolvable.
I am going to turn to some other shell to run away from problem.

@youralmight commented on GitHub (Mar 20, 2024): This issue is not an issue of Windows Terminal but of fish-shell. Fish shell treats its output differently from bash. https://github.com/fish-shell/fish-shell/issues/10384 This conflict between fish-shell feature and select-and-copy with mouse seems unsolvable. I am going to turn to some other shell to run away from problem.
Author
Owner

@youralmight commented on GitHub (Mar 21, 2024):

I find that it's okay when I use the fish shell in a remote linux server, and it doesn't work well on my WSL. I am going to trial more to locate the problem.

@youralmight commented on GitHub (Mar 21, 2024): I find that it's okay when I use the fish shell in a remote linux server, and it doesn't work well on my WSL. I am going to trial more to locate the problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21421