"\t--type,-t\t\tType of resolvable (default: package)\n"
;
}
- else if (command == "search" || command == "se") {
- static struct option search_options[] = {
+ else if (command == "search" || command == "se") {
+ static struct option search_options[] = {
{"installed-only", no_argument, 0, 'i'},
{"uninstalled-only", no_argument, 0, 'u'},
{"match-all", no_argument, 0, 0},
{"match-any", no_argument, 0, 0},
{"help", no_argument, 0, 0}
- };
- specific_options = search_options;
- specific_help =
- "search [options] [querystring...]\n"
- "\n"
- "'search' - Search for packages matching given search strings\n"
- "\n"
- " Command options:\n"
- " --match-all Search for a match to all search strings (default)\n"
- " --match-any Search for a match to any of the search strings\n"
- "-i, --installed-only Show only packages that are already installed.\n"
- "-u, --uninstalled-only Show only packages that are not curenly installed.\n"
- ;
- }
+ };
+ specific_options = search_options;
+ specific_help =
+ "search [options] [querystring...]\n"
+ "\n"
+ "'search' - Search for packages matching given search strings\n"
+ "\n"
+ " Command options:\n"
+ " --match-all Search for a match to all search strings (default)\n"
+ " --match-any Search for a match to any of the search strings\n"
+ "-i, --installed-only Show only packages that are already installed.\n"
+ "-u, --uninstalled-only Show only packages that are not curenly installed.\n"
+ ;
+ }
else {
cerr_vv << "No options declared for command " << command << endl;
// no options. or make this an exhaustive thing?
return 0;
}
- if (command == "search" || command == "se") {
+ if (command == "search" || command == "se") {
ZyppSearchOptions options;
-
+
if (help || copts.count("help")) {
cerr << specific_help;
return !help;
if (copts.count("installed-only")) {
options.setInstalledOnly();
}
-
+
if (gSettings.disable_system_resolvables || copts.count("uninstalled-only")) {
options.setUnInstalledOnly();
}
cout << "No packages found." << endl;
else
cout << t;
- }
+ }
// TODO: rug status
if (command == "patch-check" || command == "pchk") {