Show install status during file search
When doing "pacman -Fs", show the "[installed: version]" message just like "pacman -Ss". Signed-off-by: morganamilo <morganamilo@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
3370c08a29
commit
0696307a3b
1 changed files with 5 additions and 1 deletions
|
@ -101,6 +101,7 @@ static int files_fileowner(alpm_list_t *syncs, alpm_list_t *targets) {
|
||||||
|
|
||||||
static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
|
static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
alpm_db_t *db_local = alpm_get_localdb(config->handle);
|
||||||
alpm_list_t *t;
|
alpm_list_t *t;
|
||||||
const colstr_t *colstr = &config->colstr;
|
const colstr_t *colstr = &config->colstr;
|
||||||
|
|
||||||
|
@ -157,10 +158,13 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) {
|
||||||
printf("%s/%s\n", alpm_db_get_name(repo), alpm_pkg_get_name(pkg));
|
printf("%s/%s\n", alpm_db_get_name(repo), alpm_pkg_get_name(pkg));
|
||||||
} else {
|
} else {
|
||||||
alpm_list_t *ml;
|
alpm_list_t *ml;
|
||||||
printf("%s%s/%s%s %s%s%s\n", colstr->repo, alpm_db_get_name(repo),
|
printf("%s%s/%s%s %s%s%s", colstr->repo, alpm_db_get_name(repo),
|
||||||
colstr->title, alpm_pkg_get_name(pkg),
|
colstr->title, alpm_pkg_get_name(pkg),
|
||||||
colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor);
|
colstr->version, alpm_pkg_get_version(pkg), colstr->nocolor);
|
||||||
|
|
||||||
|
print_installed(db_local, pkg);
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
for(ml = match; ml; ml = alpm_list_next(ml)) {
|
for(ml = match; ml; ml = alpm_list_next(ml)) {
|
||||||
c = ml->data;
|
c = ml->data;
|
||||||
printf(" %s\n", c);
|
printf(" %s\n", c);
|
||||||
|
|
Loading…
Add table
Reference in a new issue