debug log - small but substantial change for 3.0.0 and fancy output
Ethan Blanton
elb at pidgin.im
Tue Aug 27 09:19:45 EDT 2013
Tomasz Wasilczyk spake unto us the following wisdom:
> Another change is strictly about console output: there could be
> additional switch "--debug=colored" to enable colors in bash console.
> I've prepared an implementation for it. Cool, isn't it?
I realize I'm late to this party, but I was out of the country when it
happened and I'm still digging out of my email burial. I have a
couple of comments here:
1) Bash is unrelated to anything, here. Those are ANSI escape
sequences (or DEC escape sequences, depending on how you want to
look at it) and they are dependent on your terminal type, not your
shell. The comments should reflect this.
2) I have a mild preference for actually looking to see if the
terminal can *handle* ANSI colors before blasting them out. It
would be a strong preference except for the fact that doing so will
require adding a dependency to do it "right". You can do it
"wrong" by querying the terminal type and matching against known
good color terminals, and allowing the COLORTERM environment
variable to override. This is ugly, though.
Elsewhere in this thread there was a discussion of if-else if-else
versus switch. I prefer the former until the number of cases gets
large, for a variety of reasons.
Ethan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20130827/5e019b07/attachment.sig>
More information about the Devel
mailing list