[pacman-dev] [PATCH 6/7] pacsearch: using pacman color theme

Andrew Gregory andrew.gregory.8 at gmail.com
Thu Jan 23 08:38:22 EST 2014


On 01/23/14 at 12:07am, Pierre Neidhardt wrote:
> No more per-repo coloring: this was not Arch-agnostic, and there is no
> reasonable, simple way to color repos in a consistant manner with only 6 colors.
> 
> 'local' is in red: this way we benefit from the pacman -Ss && pacman -Qs combo.
> 
> to_color subroutine: it takes an array instead of a string, this is faster and
> simpler.
> 
> Signed-off-by: Pierre Neidhardt <ambrevar at gmail.com>
> ---
>  contrib/pacsearch.in | 32 ++++++++++++++------------------
>  1 file changed, 14 insertions(+), 18 deletions(-)

If we use pacman's color theme and remove per-repo coloring does this script
still do anything worth keeping it around and fixing its bugs (try `pacsearch
pacman mirrorlist`)?  All that's left is searching both -Ss and -Qs, recoloring
"local/" red, adding "[installed]" to -Qs entries, and hiding -Qs entries that
are also in -Ss.  All but the last can be accomplished in a few lines of bash
using sed.


More information about the pacman-dev mailing list