You are not logged in.

#1 2012-01-20 12:36:35

anti-destin
Member
Registered: 2009-02-14
Posts: 234

simple way to color pacman output?

is there a simple way to color pacman output (e.g., warnings, comments about pacnew files, etc.) without using pacman-color or some other package?

thanks.

Offline

#2 2012-01-20 12:41:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: simple way to color pacman output?

What seems to be the problem with pacman-color or some other package?

Offline

#3 2012-01-20 12:43:49

anti-destin
Member
Registered: 2009-02-14
Posts: 234

Re: simple way to color pacman output?

i just don't feel like installing another package. also, i wanted to see if i could do it simply, e.g., by editing some rc file.

Offline

#4 2012-01-20 12:47:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: simple way to color pacman output?

pacman might get color support some day: http://mailman.archlinux.org/pipermail/ … 12164.html
There are tools that can colorize output like http://colordiff.sourceforge.net/ for diff but it's a wrapper (as you can read on the page).

I think you'd have to hack the source code and I'm not sure how easy would it be to keep up with the updates.

Offline

#5 2012-01-20 14:21:54

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: simple way to color pacman output?

The simplest thing possible is to apply the colour patch to the source code and recompile. The entire job involves a trivial modification of the PKGBUILD from the ABS. You may grab the ready-to-makepkg files from my git place.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#6 2012-01-20 15:51:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,466
Website

Re: simple way to color pacman output?

I'd recommend pacman-color - I know you specifically asked for something else, but to me that seems like saying your looking for a good tool to drive a screw but you don't want to use a screwdriver.

If you're bored you could try to make your own filter script that would run pacman and do some sort of search/replace to add color escape codes to the output (sed commands would be my first thought).  Of course this would really just be reinventing the wheel - and making it square.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2012-01-22 12:21:31

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

Re: simple way to color pacman output?

does anyone know if there is a specific reason for not adding color support to pacman? is it just that developers are working on more important things so they don't have time to play with trivial stuff such as colored output or is it part of the design to not have colored output? (in which case one is supposed to use pacman-color, or any of the wrappers such as packer, yaourt or something else)

I mean, the patch is there, and it works. why not merge it into pacman and have an option to turn coloring on/off?


...I put on my robe and a wizard hat...

Offline

#8 2012-01-22 12:30:04

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Offline

Board footer

Powered by FluxBB