mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
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>
This commit is contained in:
parent
7e7c64f513
commit
0088a7ab1c
@ -77,8 +77,10 @@ static int files_fileowner(alpm_list_t *syncs, alpm_list_t *targets) {
|
|||||||
if(config->op_f_machinereadable) {
|
if(config->op_f_machinereadable) {
|
||||||
print_line_machinereadable(repo, pkg, filename);
|
print_line_machinereadable(repo, pkg, filename);
|
||||||
} else if(!config->quiet) {
|
} else if(!config->quiet) {
|
||||||
printf(_("%s is owned by %s/%s %s\n"), filename,
|
const colstr_t *colstr = &config->colstr;
|
||||||
alpm_db_get_name(repo), alpm_pkg_get_name(pkg),
|
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));
|
alpm_pkg_get_version(pkg));
|
||||||
} else {
|
} else {
|
||||||
printf("%s/%s\n", alpm_db_get_name(repo), alpm_pkg_get_name(pkg));
|
printf("%s/%s\n", alpm_db_get_name(repo), alpm_pkg_get_name(pkg));
|
||||||
|
@ -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)
|
static void print_query_fileowner(const char *filename, alpm_pkg_t *info)
|
||||||
{
|
{
|
||||||
if(!config->quiet) {
|
if(!config->quiet) {
|
||||||
printf(_("%s is owned by %s %s\n"), filename,
|
const colstr_t *colstr = &config->colstr;
|
||||||
alpm_pkg_get_name(info), alpm_pkg_get_version(info));
|
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 {
|
} else {
|
||||||
printf("%s\n", alpm_pkg_get_name(info));
|
printf("%s\n", alpm_pkg_get_name(info));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user