[Yum-devel] [PATCH] and RFC: highlighting search terms in search output

James Antill jantill at redhat.com
Thu Oct 18 18:46:02 UTC 2007


On Thu, 2007-10-18 at 14:30 -0400, Matthew Miller wrote:
> On Thu, Oct 18, 2007 at 01:46:12PM -0400, James Antill wrote:
> >  Ok, this patch is fairly big adding a YumTerm class. Mostly derived
> > from: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116
> > 
> >  I've included the mode changes and the color, in the class ... although
> > the only thing used atm. is bold. The patch also contains the changes
> > needed to pass the search terms down to listPkgs() etc. so it can be
> > highlighted.
> >  This also works on the -v search output (although that looks pretty bad
> > due to all the debugging info).
> >  Comments?
> 
> Cool. Can you make text from PluginYumExit (and the like) be automatically
> wrapped at word boundaries? 

 I didn't add the lines/columns data to the class atm. although it's a
simple addition to do so. And then we could, yes.

 Saying that we already use the textwrap module in yum/update_md.py
(just assuming 80ish columns), so there's no reason to not do the same
elsewhere ... although getting the column value from terminfo will
produce a better output.

 One of the BZ I have that goes with this is if you have a lot of _long_
repoids, where the difference is all in the endings ... you can't tell
which repo. a package belongs to in list commands. This could also help
fix that.

-- 
James Antill <jantill at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20071018/3a5e9548/attachment.pgp 


More information about the Yum-devel mailing list