Closed joerixaop closed 4 years ago
Thank you for the feedback.
For a command which only goal is to add formatting to text it's unexpected to not get any formatting at all.
I am calling it a feature, not a bug :smile:. A lot of applications automatically deactivate their colored output when stdout is not a terminal. pastel paint
does the same, such that the same behavior would be inherited by shell scripts that use pastel paint
to write colored text to stdout.
Even if this is intended behaviour I'd suggest adding a command line flag to force color to be always present.
There is: Take a look at the -m
/--color-mode
flag that is present for every pastel
command:
pastel --color-mode=24bit paint red "test" | cat # this should print colored output
That being said, I agree that the ergonomics (and documentation!) around this can be improved. I'm very happy for any kind of suggestion.
For example: it might be a good idea to add something like --color-mode=force
, which still auto-detects whether 8bit or 24bit ANSI sequences should be used.
see also: #48
Closing this for now, let me know if there are unanswered questions
For a command which only goal is to add formatting to text it's unexpected to not get any formatting at all.
Even if this is intended behaviour I'd suggest adding a command line flag to force color to be always present.