Support escape sequence to query current console colors #474

Open
opened 2026-01-30 21:53:13 +00:00 by claunia · 0 comments
Owner

Originally created by @SteveL-MSFT on GitHub (Dec 10, 2018).

@richturn_ms blog post hightlights a known issue with PowerShell and non-index0 background color. However, it's possible for PSReadLine to fix this if it can [query for the current console colors] (https://superuser.com/questions/157563/programmatic-access-to-current-xterm-background-color/406172#406172) using OSC escape sequence. Works on Ubuntu, but not on macOS (default Terminal).

Originally created by @SteveL-MSFT on GitHub (Dec 10, 2018). @richturn_ms blog post hightlights a known issue with PowerShell and non-index0 background color. However, it's possible for PSReadLine to fix this if it can [query for the current console colors] (https://superuser.com/questions/157563/programmatic-access-to-current-xterm-background-color/406172#406172) using OSC escape sequence. Works on Ubuntu, but not on macOS (default Terminal).
claunia added the Product-ConhostResolution-Duplicate labels 2026-01-30 21:53:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#474