edc/bass

Coloured output is not working

IvanEh opened this issue · 4 comments

When I run something like bass git status the output is of one colour. I know that the example doesn't demonstrate the use case well but I have some scripts that output some useful information. Is it possible to pass colour codes to standard output so that it's correctly displayed?

Thanks for the tool, it's great in any case

edc commented

You don't need bass to run git status. May I ask why you need to do this?

It might not be easy to fix, because here git will detect whether the output is a terminal and then output colored or plain text. That's why if you run git status | tee /tmp/x you also won't see colored output.

edc commented

Found this: https://stackoverflow.com/questions/3515208/can-colorized-output-be-captured-via-shell-redirect and it seemed to work for me:

$ bass script -q /dev/null git status

git status is just a simplified example that came to my mind. Thank you for explaining, now it makes sense and it's clear where to look.