Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coloured output is not working #70

Closed
IvanEh opened this issue Mar 27, 2019 · 4 comments
Closed

Coloured output is not working #70

IvanEh opened this issue Mar 27, 2019 · 4 comments

Comments

@IvanEh
Copy link

IvanEh commented Mar 27, 2019

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

@IvanEh IvanEh changed the title Color output not working Coloured output is not working Mar 27, 2019
@edc
Copy link
Owner

edc commented Mar 28, 2019

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
Copy link
Owner

edc commented Mar 28, 2019

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

@IvanEh
Copy link
Author

IvanEh commented Mar 29, 2019

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.

@IvanEh IvanEh closed this as completed Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants