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
Use colors for some output messages #207
Conversation
I'd like to see the colors exposed in Templater so that you we can control color in echoed strings. For instance, we have a task that does this:
It would be nice to expose the colors as format functions so you could do something similar to this:
|
@stephenprater I think I'd prefer to have a different flag instead: print:
cmds:
- cmd: echo "Something"
color: red This wouldn't solve the use case of having different colors on the same command, though. |
Hmm - that's good point. Our use case was actually for the prefix string so it's easier to differentiate between tasks.
output would be like
Where "RED" is in red. But the more that I think about it, the less I want to expose a plethora of special variables. Maybe a function that does something like: |
@stephenprater Yeah, we need to mature that idea first. I gonna finish this PR at some point, and you're free to open another issue with a proposal if you come with a good one. 🙂 |
Color not working on Windows with 3.0 preview 4? |
@wdscxsj Have you changed your Taskfile from |
@andreynering Sure. Here is the effect on my machine (Windows 10 64-bit): |
@wdscxsj It may be a Windows-specific issue. Can you open another issue for tracking? Also, does it also happens on v2? |
@andreynering Sure, please see #343. |
This makes identifying specific types of messages easier.
Output from commands will be kept untouched.
TODO:
--color=false
flag to disable thisPrettify(skipping for now: tabwriter don't play nicely with colors)?task --list