Open tas50 opened 8 years ago
Horrible is a strong word. Are you adding colors to the table and just asking for a way to run the report with them turned off regardless of the instructions in the code? By default it doesn't add colors/bold unless you tell it to.
Horrible was probably a horrible ;) word choice. I am telling it to use color in the table, but ideally that would only be displayed in a shell. A lot of CLI tools that use coloring do this same thing to avoid printing the color codes when output is piped to redirected to a file.
When piping to another command or to a file the colors shouldn't be printed. Otherwise the output when running commands in a cron job for example is pretty horrible. Here's a snippet of a command I run via cron:
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓ ┃ ^[[1m^[[34m Repo Name ^[[0m^[[0m ┃ ^[[1m^[[31mOpen PRs ^[[0m^[[0m ┃ ^[[1m^[[31mIssues ^[[0m^[[0m ┃ ^[[1m^[[31mOldest PR ^[[0m^[[0m ┃ ^[[1m^[[31mOldest Iss^[[0m^[[0m ┃