PowerShell CLI on Unix doesn't use the current terminal's window width when stringifying formatted output for outside callers with captured / redirected stdout output #20110
Labels
Needs-Triage
The issue is new and needs to be triaged by a work group.
Prerequisites
Steps to reproduce
Scenario:
A PowerShell CLI call is made that results in formatted output (such as implicit
Format-Table
) which is returned in stringified form to the CLI caller.Generally, if the call is made from a terminal, it is that terminal's window width that determines the max. length of the formatted lines.
On a related note, for the fundamental question as to whether the terminal width should be a factor in
Out-String
andOut-File
/>
calls, see:(In the case of the implicit stringification (implicit
Out-String -Stream
) that happens via the CLI, the decision as to whether to apply a limit or not could again be based on whether stdout is redirected or not).Expected behavior
The formatted output should fill the entire terminal width (assuming a width greater than 80 characters).
This is true on Windows, but not on Unix-like platforms.
Actual behavior
The output is cut off at 79 characters.
Error details
No response
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: