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)) {
|
if(!filter(pkg)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf("%s%s %s%s %s%s%s\n", colstr->groups, grp->name,
|
if(!config->quiet) {
|
||||||
colstr->title, alpm_pkg_get_name(pkg),
|
printf("%s%s %s%s %s%s%s\n", colstr->groups, grp->name,
|
||||||
colstr->version, alpm_pkg_get_version(pkg),
|
colstr->title, alpm_pkg_get_name(pkg),
|
||||||
colstr->nocolor);
|
colstr->version, alpm_pkg_get_version(pkg),
|
||||||
|
colstr->nocolor);
|
||||||
|
} else {
|
||||||
|
printf("%s\n", alpm_pkg_get_name(pkg));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -374,12 +374,16 @@ static int sync_group(int level, alpm_list_t *syncs, alpm_list_t *targets)
|
||||||
|
|
||||||
if(level > 1) {
|
if(level > 1) {
|
||||||
for(k = grp->packages; k; k = alpm_list_next(k)) {
|
for(k = grp->packages; k; k = alpm_list_next(k)) {
|
||||||
printf("%s%s %s%s %s%s%s", colstr->groups, grp->name,
|
if(!config->quiet) {
|
||||||
colstr->title, alpm_pkg_get_name(k->data),
|
printf("%s%s %s%s %s%s%s", colstr->groups, grp->name,
|
||||||
colstr->version, alpm_pkg_get_version(k->data),
|
colstr->title, alpm_pkg_get_name(k->data),
|
||||||
colstr->nocolor);
|
colstr->version, alpm_pkg_get_version(k->data),
|
||||||
print_installed(db_local, k->data);
|
colstr->nocolor);
|
||||||
printf("\n");
|
print_installed(db_local, k->data);
|
||||||
|
printf("\n");
|
||||||
|
} else {
|
||||||
|
printf("%s\n", alpm_pkg_get_name(k->data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* print grp names only, no package names */
|
/* print grp names only, no package names */
|
||||||
|
|
Loading…
Add table
Reference in a new issue