Difference between revisions of "Colored Pacman output"

From ArchWiki
Jump to: navigation, search
(initial commit)
 
m (Changed sections)
Line 1: Line 1:
 
[[Category:PackageManagement]]
 
[[Category:PackageManagement]]
  
=== Colorizing the output of pacman ===
+
== Colorizing the output of pacman ==
 
+
====Introduction====
+
 
+
 
Now that makepkg has colorized output, why not pacman as well? [http://www.gentoo.org/ Gentoo]'s 'portage' package manager uses colors a lot, and as you can see in this [http://www.gentoo-portage.com/Image/156 screenshot], it greatly enhances readability.
 
Now that makepkg has colorized output, why not pacman as well? [http://www.gentoo.org/ Gentoo]'s 'portage' package manager uses colors a lot, and as you can see in this [http://www.gentoo-portage.com/Image/156 screenshot], it greatly enhances readability.
 
  
 
==== Scripts ====
 
==== Scripts ====
 
===== Citral =====
 
 
 
User citral uses the following script in his .bashrc:
 
User citral uses the following script in his .bashrc:
  
Line 22: Line 15:
 
         -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
 
         -e 's#^.*/.* [0-9].*#\\033[0;36m&\\033[0;37m#g' )"
 
  }
 
  }
 
===== Other scripts =====
 
 
None so far :)
 
 
  
 
==== Links ====
 
==== Links ====
 
 
[http://bbs.archlinux.org/viewtopic.php?t=12430&postdays=0&postorder=asc&start=15 Forum thread]
 
[http://bbs.archlinux.org/viewtopic.php?t=12430&postdays=0&postorder=asc&start=15 Forum thread]

Revision as of 11:27, 30 July 2005


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.

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