[pacman-dev] [PATCH 10/16] colourize table output

Simon Gomizelj simongmzlj at gmail.com
Fri Mar 1 16:32:39 EST 2013


Signed-off-by: Simon Gomizelj <simongmzlj at gmail.com>
---
 src/pacman/util.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 19ac795..43afd5c 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -846,7 +846,8 @@ static void _print_table(struct table_row_t *rows, int spacing)
 	for(row = rows; row && row->label; ++row) {
 		const char *units;
 		double s = humanize_size(row->size, 'M', 2, &units);
-		printf("%-*s %.2f %s\n", max_len, row->label, s, units);
+		printf("%s%-*s%s %.2f %s\n", colstr.title, max_len, row->label,
+				colstr.nc, s, units);
 	}
 }
 
-- 
1.8.1.4



More information about the pacman-dev mailing list