Canop/rhit

Option `--color`

Stargateur opened this issue · 2 comments

It would be nice to have an option --color like --color=yes|no|auto. auto would be if it's a terminal output color is used, if it's not color is not used. So program would default to auto.

Why ? Cause sometime you want to log text to a file (or whatever) and you don't want escape character used to put color on terminal:

For example:

38^[[38;5;239m│^[[0m^[[38;5;204m███████████▍^[[0m        ^[[38;5;239m│^[[0m
^[[38;5;239m│^[[0m2021/01/27^[[38;5;239m│^[[0m  16K^[[38;5;239m│^[[0m  51^[[38;5;239m│^[[0m^[[38;5;204m███████████████▎^[[0m    ^[[38;5;239m│^[[0m
^[[38;5;239m│^[[0m2021/01/28^[[38;5;239m│^[[0m 9088^[[38;5;239m│^[[0m  

is unreadable.

Canop commented

It looks quite easy. Will do if I don't forget.

Canop commented

done