[pacman-dev] [PATCH] Added better colourisation support for the "-S (group)" operation.
xavion.0 at gmail.com
xavion.0 at gmail.com
Sun Mar 27 22:35:37 UTC 2016
From: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
Specifically, the group is in 'blue' and the repository is in 'magenta'.
Signed-off-by: Xavion <Xavion (dot) 0 (at) Gmail (dot) com>
---
src/pacman/sync.c | 7 ++++---
src/pacman/util.c | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 041b6b2..f2ca125 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -557,9 +557,10 @@ static int process_group(alpm_list_t *dbs, const char *group, int error)
if(config->print == 0) {
char *array = malloc(count);
int n = 0;
- colon_printf(_n("There is %d member in group %s:\n",
- "There are %d members in group %s:\n", count),
- count, group);
+ const colstr_t *colstr = &config->colstr;
+ colon_printf(_n("There is %d member in group %s%s%s:\n",
+ "There are %d members in group %s%s%s:\n", count),
+ count, colstr->groups, group, colstr->title);
select_display(pkgs);
if(!array) {
ret = 1;
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 0862de0..cc63e2b 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -1255,8 +1255,9 @@ static void display_repo_list(const char *dbname, alpm_list_t *list,
unsigned short cols)
{
const char *prefix = " ";
+ const colstr_t *colstr = &config->colstr;
- colon_printf(_("Repository %s\n"), dbname);
+ colon_printf(_("Repository %s%s\n"), colstr->repo, dbname);
list_display(prefix, list, cols);
}
--
2.7.4
More information about the pacman-dev
mailing list