Text cut off using Powershell + SSH #10508

Closed
opened 2026-01-31 02:23:28 +00:00 by claunia · 8 comments
Owner

Originally created by @slothrop49 on GitHub (Sep 5, 2020).

Environment

Microsoft Windows [Version 10.0.19041.450]
Windows Terminal Preview 1.2.2382.0

Any other software?
No

Steps to reproduce

Open Terminal
Open PowerShell (7.0.3)
SSH into router (Asus AX88U)
run any command where the output is wider than the Terminal window

Expected behavior

Output will wrap when at end of line.

Actual behavior

Test stops at end of line - wider window more text, narrower window less text

Running SSH from PowerShell directly produces expected behaviour (wrapping)- the problem only exists if PowerShell is started from Terminal. Text wrapping in Terminal is normal otherwise (when not using SSH).

Originally created by @slothrop49 on GitHub (Sep 5, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 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 Microsoft Windows [Version 10.0.19041.450] Windows Terminal Preview 1.2.2382.0 Any other software? No # Steps to reproduce Open Terminal Open PowerShell (7.0.3) SSH into router (Asus AX88U) run any command where the output is wider than the Terminal window # Expected behavior Output will wrap when at end of line. # Actual behavior Test stops at end of line - wider window more text, narrower window less text Running SSH from PowerShell directly produces expected behaviour (wrapping)- the problem only exists if PowerShell is started from Terminal. Text wrapping in Terminal is normal otherwise (when not using SSH).
Author
Owner

@DHowett commented on GitHub (Sep 9, 2020):

When you SSH to your router, can you run echo $TERM; stty -a?
What command are you usually encountering this with?

@DHowett commented on GitHub (Sep 9, 2020): When you SSH to your router, can you run `echo $TERM; stty -a`? What command are you usually encountering this with?
Author
Owner

@slothrop49 commented on GitHub (Sep 10, 2020):

stty is not complied in to Asuswrt (or Asuswrt-Merlin which I use) not available from entware, so I get
xterm
-sh: stty: not found

I first noticed this where I was looking at Firewall stats /jffs/scripts/firewall stats search ip 10.55.63.150 10 , but I get this with any command where the output extends beyond the terminal width - e.g. if i run dig in a narrow window

As noted originally, this only happens if Terminal > Powershell > ssh. or Terminal > Cmd >ssh. If I run run Powershell > ssh directly (Windows inbuilt or 7.0.3) or Cmd > ssh then I get the expected text wrapping.

@slothrop49 commented on GitHub (Sep 10, 2020): stty is not complied in to Asuswrt (or Asuswrt-Merlin which I use) not available from entware, so I get `xterm` `-sh: stty: not found` I first noticed this where I was looking at Firewall stats `/jffs/scripts/firewall stats search ip 10.55.63.150 10 ` , but I get this with any command where the output extends beyond the terminal width - e.g. if i run dig in a narrow window As noted originally, this only happens if Terminal > Powershell > ssh. or Terminal > Cmd >ssh. If I run run Powershell > ssh directly (Windows inbuilt or 7.0.3) or Cmd > ssh then I get the expected text wrapping.
Author
Owner

@DHowett commented on GitHub (Oct 23, 2020):

So, this is a long shot. Can you grab a "debug tap" trace for me? It'll capture your input and output, and I'm interested in figuring out whether the data is getting lost in Terminal or in the layer underneath terminal.

Here's the info:
https://github.com/microsoft/terminal/issues/6634#issuecomment-647728401

@DHowett commented on GitHub (Oct 23, 2020): So, this is a long shot. Can you grab a "debug tap" trace for me? It'll capture your input and output, and I'm interested in figuring out whether the data is getting lost in Terminal or in the layer underneath terminal. Here's the info: https://github.com/microsoft/terminal/issues/6634#issuecomment-647728401
Author
Owner

@slothrop49 commented on GitHub (Oct 26, 2020):

Sorry to be dense but I cannot get 'debug tap' to work, I have tried adding
"debugFeaturesEnabled": true,
to settings.json, both directly under "defaultProfile" and then under "defaults"

What am I doing wrong?

@slothrop49 commented on GitHub (Oct 26, 2020): Sorry to be dense but I cannot get 'debug tap' to work, I have tried adding "debugFeaturesEnabled": true, to settings.json, both directly under "defaultProfile" and then under "defaults" What am I doing wrong?
Author
Owner

@zadjii-msft commented on GitHub (Oct 27, 2020):

Sorry, there's a typo in that comment. The setting is "debugFeatures": true, and just put that directly under defaultProfile, not under defaults. Sorry for the confusion!

@zadjii-msft commented on GitHub (Oct 27, 2020): Sorry, there's a typo in that comment. The setting is `"debugFeatures": true`, and just put that directly under `defaultProfile`, not under `defaults`. Sorry for the confusion!
Author
Owner

@slothrop49 commented on GitHub (Oct 27, 2020):

I have set "debugFeatures" and it is now working. With this enabled the content in the left hand window is now wrapping correctly. How do you want the data output saved and sent (e.g. 2 x plain text files or something else).

@slothrop49 commented on GitHub (Oct 27, 2020): I have set "debugFeatures" and it is now working. With this enabled the content in the left hand window is now wrapping correctly. How do you want the data output saved and sent (e.g. 2 x plain text files or something else).
Author
Owner

@DHowett commented on GitHub (Jul 2, 2021):

Sorry -- somehow this didn't show up in my inbox. You can feel free to e-mail me (address is in my profile) any bug report info you still have. Really sorry about missing this update!

@DHowett commented on GitHub (Jul 2, 2021): Sorry -- somehow this didn't show up in my inbox. You can feel free to e-mail me (address is in my profile) any bug report info you still have. Really sorry about missing this update!
Author
Owner

@ghost commented on GitHub (Jul 6, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jul 6, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10508