-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
std: Move TTY from std.debug to std.io and add missing colors #15806
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
Conversation
4f8d700 to
1d614f9
Compare
Vexu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could std.io.detectTTYConfig be std.io.TTY.detectConfig instead?
7aa64c8 to
5c2a45f
Compare
Also get rid of the TTY wrapper struct, which was exlusively used as a namespace - this is done by the tty.zig root struct now. detectTTYConfig has been renamed to just detectConfig, which is enough given the new namespace. Additionally, a doc comment had been added.
Also make colors not bold by default, that's what .bold is for.
| // Per https://github.com/WebAssembly/WASI/issues/162 ANSI codes | ||
| // aren't currently supported. | ||
| return .no_color; | ||
| } else if (process.hasEnvVarConstant("ZIG_DEBUG_COLOR")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel right to introduce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purely moved, I didn't make any additions not mentioned in the proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.


Closes #15804.