Page MenuHomeFreeBSD

Colored output for err(3)
Needs RevisionPublic

Authored by trasz on Wed, Oct 30, 3:16 PM.

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
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 27279
Build 25541: arc lint + arc unit

Event Timeline

trasz created this revision.Wed, Oct 30, 3:16 PM
ryan_freqlabs.com 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.

trasz added inline comments.Mon, Nov 4, 12:44 PM
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.Mon, Nov 4, 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.Mon, Nov 4, 2:13 PM
trasz added a comment.Mon, Nov 4, 4:27 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 :-)