Revision as of 19:24, 15 January 2006

Contents

Colorizing the output of pacman

Now that makepkg has colorized output, why not pacman as well? Gentoo's package manager application named 'emerge' uses colors extensively, and as you can see in this screenshot, it greatly enhances readability.

You can substitute "pacs" in these lines for anything you like. You can also alias "pacs" to something else in your .bashrc, as done above.

Using these commands is straightforward; simply use your new command instead of 'pacman', the rest is still the same!

Alternatives

qpkg in AUR also uses colored output and searches AUR and TURepositories too!

Using 'acoc'

There is another, more general possibility of colorizing arbitrary command output.
You can download the small Ruby tool acoc (and its requirements, term-ansicolor and tpty. ).
tpty is not really required, but some applications like "ls" won't run with acoc otherwise (they need to be started from a terminal (or pseudo terminal, in this case), or else they behave differently).

Now, just read the section "Advanced Installation" in acoc's INSTALL file, and configure acoc as you want to.
Create a link for 'pacman' as well, since that's primarily what we're doing this for.
Once acoc runs, you can add these lines to your acoc.conf:

It might not be perfect, or particularly nice, but so far it works fine for me.
The above lines just make pacman print all package names in bold, which is particularly helpful when doing e.g. "pacman -Ss xfce". If you like it more colorful, you can modify the lines as you want.
Read the acoc documentation contained in the source package for more information.