Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavion <Xavion (dot) 0 (at) Gmail (dot) com>2016-03-28 11:54:24 +1100
committerAllan McRae <allan@archlinux.org>2016-05-05 13:52:23 +1000
commit0088a7ab1cc2676a31debc05878a80d0bd9a6ba4 (patch)
tree6a8409a3e6c513d6348810dd88d734dbc20ee627
parent7e7c64f513460cfb391e2fc558e6fdbc83faa54d (diff)
Add colour to the output of the "-{F, Q}o" operations.
Matching output for -s operations, the repository is coloured 'magenta', the package name is 'bold', and the version is outputted in 'green'. Signed-off-by: Xavion <Xavion (dot) 0 (at) Gmail (dot) com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--src/pacman/files.c6
-rw-r--r--src/pacman/query.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c
index 5240c071..692fcd56 100644
--- a/src/pacman/files.c
+++ b/src/pacman/files.c
@@ -77,8 +77,10 @@ static int files_fileowner(alpm_list_t *syncs, alpm_list_t *targets) {
if(config->op_f_machinereadable) {
print_line_machinereadable(repo, pkg, filename);
} else if(!config->quiet) {
- printf(_("%s is owned by %s/%s %s\n"), filename,
- alpm_db_get_name(repo), alpm_pkg_get_name(pkg),
+ const colstr_t *colstr = &config->colstr;
+ printf(_("%s is owned by %s%s/%s%s %s%s\n"), filename,
+ colstr->repo, alpm_db_get_name(repo), colstr->title,
+ alpm_pkg_get_name(pkg), colstr->version,
alpm_pkg_get_version(pkg));
} else {
printf("%s/%s\n", alpm_db_get_name(repo), alpm_pkg_get_name(pkg));
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 34d7fcbe..522212d3 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -83,8 +83,9 @@ static int search_path(char **filename, struct stat *bufptr)
static void print_query_fileowner(const char *filename, alpm_pkg_t *info)
{
if(!config->quiet) {
- printf(_("%s is owned by %s %s\n"), filename,
- alpm_pkg_get_name(info), alpm_pkg_get_version(info));
+ const colstr_t *colstr = &config->colstr;
+ printf(_("%s is owned by %s%s %s%s\n"), filename, colstr->title,
+ alpm_pkg_get_name(info), colstr->version, alpm_pkg_get_version(info));
} else {
printf("%s\n", alpm_pkg_get_name(info));
}