Page MenuHomeFreeBSD

Colored output for err(3)
Needs RevisionPublic

Authored by trasz on Oct 30 2019, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 4:52 AM
Unknown Object (File)
Jan 14 2024, 4:29 AM
Unknown Object (File)
Nov 4 2023, 10:20 AM
Unknown Object (File)
Sep 2 2023, 7:29 AM
Unknown Object (File)
Jun 16 2023, 3:22 AM
Unknown Object (File)
Jun 3 2023, 8:05 AM
Unknown Object (File)
May 14 2023, 4:49 AM
Unknown Object (File)
Dec 25 2022, 1:43 PM
Subscribers

Details

Reviewers
imp
Summary

Colored output for err(3) et al. I'm not yet sure if I like it.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27279
Build 25541: arc lint + arc unit

Event Timeline

freqlabs added inline comments.
lib/libc/gen/err.c
76

May I propose following an existing convention (for example see ls) by checking for CLICOLOR instead of introducing yet another environment variable for color.

lib/libc/gen/err.c
76

But then people who do have CLICOLOR wouldn't have a way to disable it. But yeah, I see your point.

imp requested changes to this revision.Nov 4 2019, 2:13 PM

teemo. Coding the ansi escape sequences is really a bad idea.

lib/libc/gen/err.c
83

This hard coded the ansi escape sequences rather than singing termio.

This revision now requires changes to proceed.Nov 4 2019, 2:13 PM
In D22194#485930, @imp wrote:

teemo. Coding the ansi escape sequences is really a bad idea.

Indeed, but that would mean making libc depend on ncurses. And it still doesn't answer whether the idea actually makes sense :-)