News for hackers. Stuff that matters.
Re:CLI Guidelines – A guide to help you write better command... by lokedhs on Saturday December 05, 2020 @06:51AM (#25313863)
At the very least, use isatty() to check whether the output is actually to a terminal before polluting the log files.
Re:CLI Guidelines – A guide to help you write better command... by account42 on Monday December 07, 2020 @06:55AM (#25331310)
isatty and checking for TERM=dumb are sensible (as well as flags to enable/disable colors). Terminfo however is a meh depencency and since common tools (e.g. git) don't bother either there is no point in anything beyond that.