elvis_core icon indicating copy to clipboard operation
elvis_core copied to clipboard

consider using cf for colored printing

Open Licenser opened this issue 9 years ago • 6 comments

In my crusade of killing all duplicated code for color printing on the console I'd wanted to offer the suggestion of using http://github.com/project-fifo/cf this. It includes a io:format like syntax for terminal colors along with termcap based detection of weather colors should be used or not.

Licenser avatar Nov 23 '15 19:11 Licenser

@elbrujohalcon, this would add a dependency, but apart from that do we have so much coloured text that would warrant such a change?

paulo-ferraz-oliveira avatar Jun 23 '22 18:06 paulo-ferraz-oliveira

I'm not sure about using it in this project, but we should consider using it on inaka/elvis and maybe project-fifo/rebar3_lint

elbrujohalcon avatar Jun 27 '22 06:06 elbrujohalcon

👍, I'll let you decide to keep this open or not. Maybe we'll reach the point where elvis_core doesn't actually output anything but simply creates the "outputables".

paulo-ferraz-oliveira avatar Jun 27 '22 11:06 paulo-ferraz-oliveira

Is it outputting something right now? Where is that outputting happening?

elbrujohalcon avatar Jun 27 '22 12:06 elbrujohalcon

Oh, I see.

elbrujohalcon avatar Jun 27 '22 12:06 elbrujohalcon

So, the idea is to replace those mustchoed colors (like {{red-bold}}) by whatever cf uses for that. I think it's a good idea, but I also think that this project should not be printing anything.

elbrujohalcon avatar Jun 27 '22 12:06 elbrujohalcon