Configuration option to control colored output #191
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#191
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There should be a configuration option to control whether output is colored by default, or not.
While direct interactive use could be covered by a shell alias to always include --no-color, invocations of borgmatic from wrapper scripts however need to be adjusted as well, so a single global configuration option would be much nicer.
A config option seems reasonable! My only question is: What's your motivation for disabling color? Is it just obnoxious in some cases? Incorrectly colored? Triggering in non-interactive invocations? Thanks.
Strong personal taste, I guess. 😄 The higher contrast of black and white messages is more helpful to me to grasp them, than some color indicating the type of message, when it starting with e.g. "Error:" is pretty clear already. 😉
Makes sense. I think this should be pretty straight-forward.
Well, it was not as straight-forward as I thought, but I managed to release this change in borgmatic 1.3.8.
The configuration option goes in a new
output
section in borgmatic configuration. Example:There are still a few cases where console color can show up even with this option set. E.g., if an error occurs prior to configuration being loaded. But other than that, I think this should do what you're looking for. Let me know if it works out for you, and thanks for suggesting it!