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

Simon Gomizelj simongmzlj at gmail.com
Wed Mar 6 12:51:51 EST 2013


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

diff --git a/src/pacman/util.c b/src/pacman/util.c
index e94b6ad..8008c33 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -857,9 +857,11 @@ static void display_transaction_sizes(alpm_list_t *table)
 	for(i = table; i; i = alpm_list_next(i)) {
 		struct table_row_t *row = i->data;
 		const char *units;
+		const colstr_t *colstr = &config->colstr;
 		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->nocolor, s, units);
 	}
 }
 
-- 
1.8.1.5



More information about the pacman-dev mailing list