diff --git a/doc/pacman.8.asciidoc b/doc/pacman.8.asciidoc index 630ff0d9..40695d07 100644 --- a/doc/pacman.8.asciidoc +++ b/doc/pacman.8.asciidoc @@ -347,10 +347,10 @@ Query Options (apply to '-Q')[[QO]] pacman's output is processed in a script. Search will only show package names and not version, group, and description information; owns will only show package names instead of "file is owned by pkg" messages; group - will only show package names and omit group names; list will only show - files and omit package names; check will only show pairs of package names - and missing files; a bare query will only show package names - rather than names and versions. + will only show package names and omit group names and package versions; + list will only show files and omit package names; check will only show + pairs of package names and missing files; a bare query will only show + package names rather than names and versions. *-s, \--search* :: Search each locally-installed package for names or descriptions that @@ -430,7 +430,7 @@ linkman:pacman.conf[5]. pacman's output is processed in a script. Search will only show package names and not repository, version, group, and description information; list will only show package names and omit databases and versions; group will - only show package names and omit group names. + only show package names and omit group names and package versions. *-s, \--search* :: This will search each package in the sync databases for names or diff --git a/scripts/completion/zsh_completion.in b/scripts/completion/zsh_completion.in index 3f81e9f7..463f550e 100644 --- a/scripts/completion/zsh_completion.in +++ b/scripts/completion/zsh_completion.in @@ -322,7 +322,7 @@ _pacman_completions_all_packages() { _pacman_completions_installed_groups() { local -a cmd groups _pacman_get_command - groups=(${(o)${(f)"$(_call_program groups $cmd[@] -Qg)"}% *}) + groups=(${(o)${(f)"$(_call_program groups $cmd[@] -Qg)"}%% *}) typeset -U groups compadd "$@" -a groups } diff --git a/src/pacman/query.c b/src/pacman/query.c index d75c4c80..a60bbf96 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -352,9 +352,10 @@ static int display(alpm_pkg_t *pkg) static int query_group(alpm_list_t *targets) { alpm_list_t *i, *j; + alpm_db_t *db_local = alpm_get_localdb(config->handle); + const colstr_t *colstr = &config->colstr; const char *grpname = NULL; int ret = 0; - alpm_db_t *db_local = alpm_get_localdb(config->handle); if(targets == NULL) { for(j = alpm_db_get_groupcache(db_local); j; j = alpm_list_next(j)) { @@ -366,7 +367,10 @@ static int query_group(alpm_list_t *targets) if(!filter(pkg)) { continue; } - printf("%s %s\n", grp->name, alpm_pkg_get_name(pkg)); + printf("%s%s %s%s %s%s%s\n", colstr->groups, grp->name, + colstr->title, alpm_pkg_get_name(pkg), + colstr->version, alpm_pkg_get_version(pkg), + colstr->nocolor); } } } else { @@ -381,8 +385,10 @@ static int query_group(alpm_list_t *targets) continue; } if(!config->quiet) { - printf("%s %s\n", grpname, - alpm_pkg_get_name(p->data)); + printf("%s%s %s%s %s%s%s\n", colstr->groups, grpname, + colstr->title, alpm_pkg_get_name(p->data), + colstr->version, alpm_pkg_get_version(p->data), + colstr->nocolor); } else { printf("%s\n", alpm_pkg_get_name(p->data)); } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index f166347a..93225bab 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -330,6 +330,7 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) { alpm_list_t *i, *j, *k, *s = NULL; alpm_db_t *db_local = alpm_get_localdb(config->handle); + const colstr_t *colstr = &config->colstr; int ret = 0; if(targets) { @@ -346,8 +347,10 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) /* get names of packages in group */ for(k = grp->packages; k; k = alpm_list_next(k)) { if(!config->quiet) { - printf("%s %s", grpname, - alpm_pkg_get_name(k->data)); + printf("%s%s %s%s %s%s%s", colstr->groups, grpname, + colstr->title, alpm_pkg_get_name(k->data), + colstr->version, alpm_pkg_get_version(k->data), + colstr->nocolor); print_installed(db_local, k->data); printf("\n"); } else { @@ -371,8 +374,10 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets) if(level > 1) { for(k = grp->packages; k; k = alpm_list_next(k)) { - printf("%s %s", grp->name, - alpm_pkg_get_name(k->data)); + printf("%s%s %s%s %s%s%s", colstr->groups, grp->name, + colstr->title, alpm_pkg_get_name(k->data), + colstr->version, alpm_pkg_get_version(k->data), + colstr->nocolor); print_installed(db_local, k->data); printf("\n"); }