[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-user
Subject:    Re: [gentoo-user] Highlight certain packages being upgraded
From:       Neil Bothwick <neil () digimed ! co ! uk>
Date:       2023-07-12 21:43:12
Message-ID: 20230712224312.5ac3157b () digimed ! co ! uk
[Download RAW message or body]


On Sun, 9 Jul 2023 13:10:17 -0500, Dale wrote:

> > Just about every program on this computer does more than I need. What
> > counts is that they do all that I need :)
> >
> > Have you looked at using sed to add extra colour codes to the output
> > of emerge?

> I don't know anything about sed.   Heck, it took me a long to to even get
> started with grep.   ROFL

Try this:

Create a file with the package atoms you want to highlight, one per
line, say packages.txt. Then run this command, you'll need to rerun it
each time you edit the packages list

awk '{print "s:\\("$0"\\):\\x1b[1;31m\\1:"}' packages.txt
>|packages.script

Then run

emerge --options @world -p --color y | sed -f packages.script

It highlights any of the packages in your file in bright red. See
https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 for a list
of colour options.


-- 
Neil Bothwick

If you give a man a fish, he's fed for a day.
If you teach a man to fish, he'll buy a silly hat.
If you talk about fish to a starving man, you're a consultant.

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic