Colored Pacman output

From ArchWiki
Revision as of 11:24, 30 July 2005 by Citral (talk | contribs) (initial commit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Colorizing the output of pacman


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



User citral uses the following script in his .bashrc:

alias pacs="pacsearch"
pacsearch () {
       echo -e "$(pacman -Ss $@ | sed \
       -e 's#current/.*#\\033[1;31m&\\033[0;37m#g' \
       -e 's#extra/.*#\\033[0;32m&\\033[0;37m#g' \
       -e 's#community/.*#\\033[1;35m&\\033[0;37m#g' \
       -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
Other scripts

None so far :)


Forum thread