summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2013-03-01 15:00:40 -0500
committerAllan McRae <allan@archlinux.org>2013-03-07 15:55:04 +1000
commitce06e6f9b9529c204224468537354cd4013c8f39 (patch)
treeca2c7b59406b1eccffbf2f4ffbb434fa5a285079 /src
parent5dada13a1a5d8cc6edccf74f80d7e445467cd5f5 (diff)
downloadpacman-ce06e6f9b9529c204224468537354cd4013c8f39.tar.xz
colourize table output
Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 4dd0acad..f58013a9 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);
}
}