[pacman-dev] Pacman color output
VMiklos
vmiklos at frugalware.org
Sun Jun 4 14:45:40 EDT 2006
On Sun, Jun 04, 2006 at 02:09:20PM +0200, Wael Nasreddine <wael at siemens-mobiles.org> wrote:
> Yes it is disabled by default actually and i didn't even know about it,
> i just saw it inside the code..
probably you know the definitio of the easter egg ;)
> it is already applied, i'll see how many chars i can print
$ grep LOG_STR_LEN *.h
log.h:#define LOG_STR_LEN 256
> Actually what i did, in src/pacman/log.h i added something like
> /* colors */
> #define GREEN "\033[1;32m"
> #define RED "\033[1;31m"
> #define YELLOW "\033[1;33m"
> #define BLUE "\033[1;36m"
> #define CLEAR "\033[m"
>
> maybe add them in the config instead
huh? #defines are correct imho, we don't want a theme-able pacman, do
we? :)
> but anyway this would be make
> things easier, i also added config->color (use_color directive) which
> probably be better
imo separating this from the ilovecandy is a good idea
> though there's too much messages to edit
you can handle the libalpm messages at once. in pacman itself, what about modifying only
the MSG, WARN and ERR macros in log.h? (an extra parameter to pm_fprintf
then it could hanele the color or so)
> i'll try the above instead of GREEN etc.. i'll call them INFO WARN ERROR
> CLEAR so it'll be open
i would suggest using the already existing names (see above)
> and if it's ok i'll send a patch (base code is
> urs from frugalware) ..
sure, feel free to came up with a patch :)
udv / greetings,
VMiklos
--
Developer of Frugalware Linux, to make things frugal - http://frugalware.org
More information about the pacman-dev
mailing list