[pacman-dev] coloured pacman

Jürgen Hötzel juergen at hoetzel.info
Tue Feb 6 13:47:24 EST 2007


On Tue, Feb 06, 2007 at 10:49:40AM -0600, Aaron Griffin wrote:
> On 2/6/07, Vojtěch Gondžala <vogo at seznam.cz> wrote:
> > Hi all,
> >
> > this patch add coloured output in to pacman-3.0.0
> >
> > diff is here: http://www.fi.muni.cz/~xgondz/pacman3-color/pacman3-color.diff
> 
> I think the general consensus is that coloring pacman output is bad,
> but I really have no technical opinion.
> 
> Two things, about your patch:
> a) Could you set this up to include a pacman.conf setting (maybe
> UseColor) and only output color when that is true.
> 
> b) Could you please send the patch in unified diff format, it makes it
> easier for us to see the changes you made and comment on them (see
> submitting-patches at the top of pacman CVS's root).
> 
> Thanks for the patch!
> 
> Does anyone have strong opinions either way about color?  I for one
> don't care that much, as long as I can shut it off.

Its not easy to display colored text in a portable way. An easy, but
wrong way is using ANSI escape sequences directly because you make
assumption about the tty. 

A much more portable way is querying the database of terminal capabilities
(termcap/terminfo). 

Jürgen



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20070206/77c92af7/attachment.pgp>


More information about the pacman-dev mailing list