Summary: | systemd-delta: Only colorize when on tty | ||
---|---|---|---|
Product: | systemd | Reporter: | Daniel Schaal <farbing> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Patch: only colorize output when on tty
Remade patch without macros |
Idea is OK. Could you remake the patch to not use macros (similar coloring issues were solved in journalctl.c or systemctl.c)? Created attachment 83605 [details] [review] Remade patch without macros Pushed as http://cgit.freedesktop.org/systemd/systemd/commit/?id=0b5a519, but changed to share the on_tty() wrapper between the three places where it is necessary. Thanks for the patch. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 83508 [details] Patch: only colorize output when on tty Currently systemd-delta always puts highlighting escape codes in the output, even if the output is redirected to a file. Attached is a patch, which checks if the output is a tty and disables the highlighting if this is not the case.