[Yum-devel] [PATCH 1/2] Prefer to overflow the last column, as then grep still works

James Antill james at and.org
Thu Mar 4 19:28:17 UTC 2010


---
 output.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/output.py b/output.py
index 110aa0b..27fc81c 100755
--- a/output.py
+++ b/output.py
@@ -392,7 +392,10 @@ class YumOutput:
                                                          total_width)
                 if not thelps:
                     continue
-                if thelps < helps:
+                #  We prefer to overflow: the last column, and then earlier
+                # columns. This is so that in the best case (just overflow the
+                # last) ... grep still "works", and then we make it prettier.
+                if thelps < helps or (thelps == helps and d == (cols - 1)):
                     continue
                 helps = thelps
                 val   = d
-- 
1.6.6



More information about the Yum-devel mailing list