summaryrefslogtreecommitdiffstats
path: root/src/pacman/pacman.c
diff options
context:
space:
mode:
authorArtyom <smirnoffjr@gmail.com>2007-11-07 08:05:33 +0100
committerDan McGee <dan@archlinux.org>2007-11-25 21:33:32 +0100
commit1e9a1a0292dbbf8039b8fb7536dbff2af28c7afb (patch)
tree0e562b0608c2b530d12c3c07e4b9becb000d4ed2 /src/pacman/pacman.c
parentc36b0f32c6f77cc363ed8f3ddc1a50625af944a9 (diff)
downloadpacman-1e9a1a0292dbbf8039b8fb7536dbff2af28c7afb.tar.gz
pacman-1e9a1a0292dbbf8039b8fb7536dbff2af28c7afb.tar.xz
Add -q/--quiet option for controlling output.
Currently this only affects -Ss, -Sl, and -Q to output less information (only package names). In the future, we can reuse this flag for other things as well. [Aaron: rewritten as a front-end flag] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> [Dan: squashed commits together] Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/pacman.c')
-rw-r--r--src/pacman/pacman.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 10f4c24b..4c24d10b 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -112,6 +112,7 @@ static void usage(int op, const char * const myname)
printf(_(" -s, --search <regex> search locally-installed packages for matching strings\n"));
printf(_(" -t, --orphans list all packages not required by any package\n"));
printf(_(" -u, --upgrades list all packages that can be upgraded\n"));
+ printf(_(" -q --quiet show less information for query and search\n"));
} else if(op == PM_OP_SYNC) {
printf("%s: %s {-S --sync} [%s] [%s]\n", str_usg, myname, str_opt, str_pkg);
printf("%s:\n", str_opt);
@@ -131,6 +132,7 @@ static void usage(int op, const char * const myname)
printf(_(" --ignore <pkg> ignore a package upgrade (can be used more than once)\n"));
printf(_(" --ignoregroup <grp>\n"
" ignore a group upgrade (can be used more than once)\n"));
+ printf(_(" -q --quiet show less information for query and search\n"));
}
printf(_(" --config <path> set an alternate configuration file\n"));
printf(_(" --logfile <path> set an alternate log file\n"));
@@ -286,6 +288,7 @@ static int parseargs(int argc, char *argv[])
{"owns", no_argument, 0, 'o'},
{"file", no_argument, 0, 'p'},
{"print-uris", no_argument, 0, 'p'},
+ {"quiet", no_argument, 0, 'q'},
{"root", required_argument, 0, 'r'},
{"recursive", no_argument, 0, 's'},
{"search", no_argument, 0, 's'},
@@ -308,7 +311,7 @@ static int parseargs(int argc, char *argv[])
{0, 0, 0, 0}
};
- while((opt = getopt_long(argc, argv, "ARUFQSTr:b:vkhscVfmnoldepituwygz", opts, &option_index))) {
+ while((opt = getopt_long(argc, argv, "ARUFQSTr:b:vkhscVfmnoldepituwygzq", opts, &option_index))) {
alpm_list_t *list = NULL, *item = NULL; /* lists for splitting strings */
if(opt < 0) {
@@ -448,6 +451,9 @@ static int parseargs(int argc, char *argv[])
config->flags |= PM_TRANS_FLAG_NOCONFLICTS;
break;
case 'y': (config->op_s_sync)++; break;
+ case 'q':
+ config->quiet = 1;
+ break;
case '?': return(1);
default: return(1);
}