-
Notifications
You must be signed in to change notification settings - Fork 55
Control color output with C2_COLORS environment variable #178
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
base: master
Are you sure you want to change the base?
Conversation
ee5cef6 to
bdbd6c8
Compare
|
Please be Very careful with globals in combination with plugins. Since the plugins will have a different set of them. Please see the ast.setGlobals() function. It's a bit of a hack, but it's the only way to have access to the same globals atm.. |
Yes, I am aware of this problem. As long as we call Alternately, we could make these variables members of the The |
9242087 to
a8f79c0
Compare
|
To keep the plugins working, all AST globals need to be moved to the Globals struct) |
f4b6725 to
52b2b9d
Compare
|
We need to discuss this on the phone, there are also some regressions |
|
This PR is flagged as a draft for now. Work in progress |
651d347 to
adfc6c3
Compare
f984be8 to
0a6c2ed
Compare
442c0ac to
8bae15c
Compare
1e286e2 to
0b23c8b
Compare
620bb23 to
65c4ec4
Compare
54e6f49 to
eac2139
Compare
a24e26d to
7cb8a85
Compare
e24f77a to
0753858
Compare
a4f80d0 to
390c483
Compare
a1c2653 to
c50fcc7
Compare
2499c4b to
6028f25
Compare
* use style names instead of hard-coded color names * customize color output via environment variable `C2_COLORS`: eg: `C2_COLORS=none`, `C2_COLORS="error:bright-blue"`, `C2_COLORS="error:#d0d0d0"` * use console to output error messages in source_mgr and c2recipe_parser. * use cache to avoid multiple calls to `unix.isatty()` and `stdlib.getenv()` * share global colors with plugins * simplify error formating in **source_mgr.c2** * add c2cat color customisation
C2_COLORS: eg:C2_COLORS=none,C2_COLORS="error:bright-blue,C2_COLORS="error:#d0d0d0unix.isatty()andstdib.getenv()