-
Notifications
You must be signed in to change notification settings - Fork 118
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
Make --color a shakeOption #49
Comments
(Alternatively to making it an option, |
Also, in |
First rule of programming, never assume command line arguments are short - every time I've done that someone has piped several Mb through the arguments (seriously, it's happened about 5 times). I've switched to I suspect that exposing Once it is available everywhere easily, then I can think about making it the default. In general very few programs use color by default, in particular In the meantime, you can easily work around this by using |
Yes, using withColors f = do args <- getArgs
withArgs ("--color":args) f
withColors $ shakeStuff ... now. |
Note that npm, part of Node.js, uses colored text on Windows in the standard console quite successfully, so I can always copy what they are doing. |
ansi-terminal implements cross-platform colors. It also provides setTitle, so that code can go away (except for the xterm check). |
@Mathnerd314 @feuerbach - very cool, clear interface, minimal dependencies, looks like it provides what I need. However, a quick try shows it works nicely in the Windows console, but not so well in Cygwin bash console on Windows. I'll see if I can figure out why, and if I can fix that up, it would make implementing colors much easier. |
Trying |
There should also be a |
I would like to enable colouring by default using
shakeOptions
; it is not exposed there yet.Also: Colours are great, they should be on by default! A bit of green makes your build system feel much friendlier.
The text was updated successfully, but these errors were encountered: