Allow -q to argumentless -Qg/-Sgg as well
Like other query operations. This may not be very useful, but even -Qs/-Ss with no arguments accept -q, so let's follow the convention and be consistent. Signed-off-by: Taro Tanaka <mkrmdk@gmail.com>
This commit is contained in:
parent
553d0a1249
commit
9f3235b2ef
2 changed files with 18 additions and 10 deletions
|
@ -367,10 +367,14 @@ static int query_group(alpm_list_t *targets)
|
|||
if(!filter(pkg)) {
|
||||
continue;
|
||||
}
|
||||
if(!config->quiet) {
|
||||
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 {
|
||||
printf("%s\n", alpm_pkg_get_name(pkg));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -374,12 +374,16 @@ 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)) {
|
||||
if(!config->quiet) {
|
||||
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");
|
||||
} else {
|
||||
printf("%s\n", alpm_pkg_get_name(k->data));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* print grp names only, no package names */
|
||||
|
|
Loading…
Add table
Reference in a new issue