Difference between revisions of "Colored Pacman output"

From ArchWiki
Jump to: navigation, search
m
Line 1: Line 1:
[[Category:Package Management (简体中文)]]
+
[[Category:Package Management]]
  
  

Revision as of 09:09, 28 August 2005

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n links end

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.

Scripts

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' )"
}

Links

Forum thread