Difference between revisions of "Colored Pacman output"

From ArchWiki
Jump to: navigation, search
m
m (fx redir)
(30 intermediate revisions by 23 users not shown)
Line 1: Line 1:
[[Category:Package Management]]
+
#REDIRECT[[Pacman Tips#Color output]]
 
 
 
 
{{i18n_links_start}}
 
{{i18n_entry|English|Colored Pacman output}}
 
{{i18n_entry|简体中文|让 Pacman 的输出带有色彩}}
 
{{i18n_links_end}}
 
 
 
== Colorizing the output of pacman ==
 
Now that makepkg has colorized output, why not pacman as well? [http://www.gentoo.org/ Gentoo]'s package manager application named 'emerge' uses colors extensively, and as you can see in this [http://www.gentoo-portage.com/Image/156 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 ====
 
[http://bbs.archlinux.org/viewtopic.php?t=12430&postdays=0&postorder=asc&start=15 Forum thread]
 

Revision as of 13:45, 1 January 2010