task icon indicating copy to clipboard operation
task copied to clipboard

Make "--list" and "--list-all" output colored

Open orenmazor opened this issue 2 years ago • 1 comments

I'd like my taskfiles to be used as their own manpages.

So I could have folks look at my project, and run task -a or task --sumarize and it prints a nicely formatted output of what's available.

Right now this is what I get:

Screen Shot 2022-08-24 at 6 24 16 PM

which is awesome as a starting point, but color makes this more accessible.

For example, look at this tldr page:

Screen Shot 2022-08-24 at 6 25 04 PM

much more accessible for new members of the team looking at a custom set of tools!

Is there any way to accomplish this with task out of the box?

orenmazor avatar Aug 24 '22 22:08 orenmazor

Hi @orenmazor,

This sounds like a reasonable feature request.

We just have to keep in mind that we need to respect --color=false or env NO_COLOR=1 if given, by skipping colors if asked.

EDIT: When combining with --silent the output should also not have any colors.

andreynering avatar Sep 17 '22 17:09 andreynering

@andreynering @orenmazor Not sure why I put this as a comment... Please see https://github.com/go-task/task/pull/874

pd93 avatar Sep 29 '22 17:09 pd93