To get feedback while searching instead of using another utility for
this purpose, whether the desired packages are installed. You can see
example for it in case of yaourt.

Signed-off-by: Laszlo Papp <[email protected]>
---
 src/pacman/sync.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index dc93621..3ae6927 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -330,6 +330,11 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t 
*targets)
                                        printf(")");
                                }
 
+                               pmpkg_t *ipkg = alpm_db_get_pkg(db_local, 
alpm_pkg_get_name(pkg));
+                               if (ipkg) {
+                                       printf(_(" [installed: %s]"), 
alpm_pkg_get_version(ipkg));
+                               }
+
                                /* we need a newline and initial indent first */
                                printf("\n    ");
                                indentprint(alpm_pkg_get_desc(pkg), 4);
-- 
1.6.4.1


Reply via email to