From 0088a7ab1cc2676a31debc05878a80d0bd9a6ba4 Mon Sep 17 00:00:00 2001 From: Xavion Date: Mon, 28 Mar 2016 11:54:24 +1100 Subject: 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 Signed-off-by: Allan McRae --- src/pacman/query.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pacman/query.c') 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)); } -- cgit v1.2.3-24-g4f1b