Add support for Terminal.app on macOS
- Dominant language
- Rust
- Stars
- 14.6k
- Forks
- 734
- Avg merge
- 8h 40m
- Merged PRs (30d)
- 4
Description
We currently expect full RGB support from the hosting terminal. Terminal.app is likely the only popular terminal that doesn't support it, but it's _very_ popular (relatively speaking), so we should add support for it. This requires downsampling the color here:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/framebuffer.rs#L524-L555
And somehow detecting RGB support here:
https://github.com/microsoft/edit/blob/b008570afc0c4c6cef7ba0335d407139a47c8e24/src/bin/edit/main.rs#L499-L595
Detecting RGB support should not use the `COLORTERM` environment variable, because a) I don't like it and b) I'm quite certain there's alternatives to do it. The simplest alternative is to just assume that Terminal.app is the only terminal that doesn't support it (...given that this project doesn't aim to support old terminals).
Contributor guide
Research direction
Start with the framebuffer color handling in src/framebuffer.rs around lines 524–555 and terminal detection in src/bin/edit/main.rs around lines 499–595. Determine how RGB capability can be detected without COLORTERM, then implement Terminal.app support by downsampling colors. Done means Terminal.app renders correctly while terminals with RGB support retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100