-
Notifications
You must be signed in to change notification settings - Fork 64
Out-ConsoleGridView doesn't handle ANSI escape sequences correctly #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Tracking issue in gui.cs added: gui-cs/Terminal.Gui#1097 |
Why would gui.cs parse external escape sequences? |
Should be fixed by #141 |
This is not fixed. I now understand the issue. Terminal.Gui is simply rendering the characters presented. Thus OCGV shows them. Because powershell now colorized things in I am not sure what the right thing to do is. Is it expected that any Powershell function or cmdlet that takes piped input should look for and strip off ANSI escape sequences before displaying? |
Reading this: PowerShell/PowerShell#13071 I'm looking for But since the cmdlet is currently built for PS 6.x, these aren't available? Once I figure out how to access these, it should be trivial to fix this bug by changing the logic here to strip the ANSI from the input. @SteveL-MSFT the APIs in the Issue above are not exposed publicly that I can see. What's the recommended way for a cmdlet to strip the ANSI off of input? |
… sequences correctly
This fix should be in the release this month |
* Fixed #58: Multi-line commands rendering wrong * Fixed #58 - Newlines in commands render incorrectly * Added debug instructions to readme * simplified stripping of newline/linefeed * made column spacing tighter * removed excess padding on right * removed excess rows at bottom * status bar wsa occluding window * fixed build scripts to only build ocgv * refactored to make logic more obvious * removed orig files * Updated references to latest Terminal.Gui * Fixed #131 and upgraded to terminal.gui 1.6, pwsh 7.2, and net60 * supported .net and reverted change * Fixes #131 - Out-ConsoleGridView doesn't handle ANSI escape sequences correctly * removed border when minui is enabled * re-implemented feature post merge screw up * improve VS code build and debug support * On exit, ensure only visible marked items are output * Fixes 87 * Fixing crash when MinUi PR is merged * Tweaked build to have a better test at end * removed merge artifacts * exclude .orig files (merge artifacts) Co-authored-by: Tyler James Leonhardt <[email protected]> Co-authored-by: Andy Jordan <[email protected]>
It appears that gui.cs may not support rendering ANSI escape sequences. In the meantime, if using pwsh 7.2+,
Out-ConsoleGridView
should useStringDecorated
type to make sure all text is plain text.https://twitter.com/Jaykul/status/1339064642715398150
The text was updated successfully, but these errors were encountered: