-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Implement colored output (with NO_COLOR support) #145
Copy link
Copy link
Open
Description
Colours sould only be enabled when the terminal supports them.
For example, when redirecting output or piping to cat, there should be no escape sequences.
I believe there needs to be a condition around the pretty method (or maybe it should be handled by tracing_subscriber::fmt):
| .pretty() |
Examples:
stackablectl --log-level=DEBUG stack list > /tmp/stackablectl.stdout # plain redirect
stackablectl --log-level=DEBUG stack list | cat > /tmp/stackablectl.stdout # pipe through cat
TERM= stackablectl --log-level=DEBUG stack list > /tmp/stackablectl.stdout # explicitly set TERM to nothingIf I open it in VIM, it looks like this:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
