header << _("Name");
header << _("Summary");
header << _("Type");
- header << _("Repository");
*_table << header;
}
row << (s->installedEmpty() ? "" : "i");
row << s->name();
- //! \todo improve the abbreviation
- row << (_gopts.no_abbrev || s->theObj()->summary().size() < 33 ?
- s->theObj()->summary() : s->theObj()->summary().substr(0,28) + "...");
+ row << s->theObj()->summary();
row << kind_to_string_localized(s->kind(), 1);
- row << selectable_search_repo_str(*s);
*_table << row;
return true;
}
// rug compatibility option, we have --repo
{"catalog", required_argument, 0, 'c'},
{"repo", required_argument, 0, 'r'},
+ {"details", no_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
"-r, --repo <alias|#|URI> Search only in the specified repository.\n"
" --sort-by-name Sort packages by name (default).\n"
" --sort-by-repo Sort packages by repository.\n"
+ " --details Show each available version in each repository\n"
+ " on a separate line.\n"
"\n"
"* and ? wildcards can also be used within search strings.\n"
);
try
{
- FillSearchTableSolvable callback(t);
- invokeOnEach(query.selectableBegin(), query.selectableEnd(), callback);
+ if (_copts.count("details"))
+ {
+ FillSearchTableSolvable callback(t);
+ invokeOnEach(query.selectableBegin(), query.selectableEnd(), callback);
+ }
+ else
+ {
+ FillSearchTableSelectable callback(t);
+ invokeOnEach(query.selectableBegin(), query.selectableEnd(), callback);
+ }
if (t.empty())
out().info(_("No resolvables found."), Out::QUIET);