summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 8af05e06..e780d6e0 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -146,7 +146,11 @@ static int query_search(alpm_list_t *targets)
alpm_list_t *grp;
pmpkg_t *pkg = alpm_list_getdata(i);
- printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ if (!config->quiet) {
+ printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ } else {
+ printf("%s", alpm_pkg_get_name(pkg));
+ }
/* print the package size with the output if ShowSize option set */
if(config->showsize) {
@@ -156,14 +160,17 @@ static int query_search(alpm_list_t *targets)
printf(" [%.2f MB]", mbsize);
}
- if((grp = alpm_pkg_get_groups(pkg)) != NULL) {
- group = alpm_list_getdata(grp);
- printf(" (%s)", (char *)alpm_list_getdata(grp));
- }
- /* we need a newline and initial indent first */
- printf("\n ");
- indentprint(alpm_pkg_get_desc(pkg), 4);
+ if (!config->quiet) {
+ if((grp = alpm_pkg_get_groups(pkg)) != NULL) {
+ group = alpm_list_getdata(grp);
+ printf(" (%s)", (char *)alpm_list_getdata(grp));
+ }
+
+ /* we need a newline and initial indent first */
+ printf("\n ");
+ indentprint(alpm_pkg_get_desc(pkg), 4);
+ }
printf("\n");
}
@@ -307,7 +314,11 @@ static void display(pmpkg_t *pkg)
dump_pkg_changelog(changelog, alpm_pkg_get_name(pkg));
}
if(!config->op_q_info && !config->op_q_list && !config->op_q_changelog) {
- printf("%s %s\n", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ if (!config->quiet) {
+ printf("%s %s\n", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg));
+ } else {
+ printf("%s\n", alpm_pkg_get_name(pkg));
+ }
}
}