.TP
\fBsearch\fR (\fBse\fR) [\fIoptions\fR] [\fBquerystring\fR] ...
Search for resolvables matching given strings. * (any substring) and ? (any character) wildcards can also be used within search strings.
+.IP
+Results of search are printed in a table with following columns: S (status), Catalog, Type (type of resolvable), Name, Version, Arch (architecture). Status column can contain following values: i - installed, v - another version installed, or an empty space for neither of the former cases.
+.IP
+In \fBrug compatibility mode\fR the --type option defaults to \fBpackage\fR. Furthermore, Instead of the Type column, rug's Bundle column is printed, however, with no contents.
+.IP
+This command accepts the following options:
+
.TP
\fI \-\-match\-all\fR
Search for a match to all search strings (default).
#include <boost/function.hpp>
#include <zypp/ZYpp.h>
+#include "zmart.h"
#include "zypper-tabulator.h"
+extern Settings gSettings;
+
/**
* Represents zypper search options.
*/
FillTable(Table & table, InstalledCache & icache) :
_table(&table), _icache(&icache) {
TableHeader header;
- header << "S" << "Catalog" << "Bundle" << "Name" << "Version" << "Arch";
+
+ header << "S" << "Catalog";
+
+ if (gSettings.is_rug_compatible)
+ header << "Bundle";
+ else
+ header << "Type";
+
+ header << "Name" << "Version" << "Arch";
+
*_table << header;
}
// add other fields to the result table
row << pool_item.resolvable()->source().alias()
- << "" // TODO what about rug's Bundle?
+ // TODO what about rug's Bundle?
+ << (gSettings.is_rug_compatible ? "" : pool_item.resolvable()->kind().asString())
<< pool_item.resolvable()->name()
<< pool_item.resolvable()->edition().asString()
<< pool_item.resolvable()->arch().asString();
}
options.setKind(kind);
}
+ else if (gSettings.is_rug_compatible) {
+ kind = ResTraits<Package>::kind;
+ options.setKind(kind);
+ }
options.resolveConflicts();