From a3cafef15f10fe7414cf3008c13300b3ea14b0aa Mon Sep 17 00:00:00 2001 From: SpookyDervish Date: Sat, 20 Jun 2026 17:27:43 +1000 Subject: [PATCH] option to show installed packages in search --- neb/src/search.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neb/src/search.py b/neb/src/search.py index d6c7373..edeb5d4 100644 --- a/neb/src/search.py +++ b/neb/src/search.py @@ -1,4 +1,4 @@ -from .util import get_package_index +from .util import get_package_index, installed_libs from .console import console from rich.table import Table @@ -7,8 +7,9 @@ from rich.box import ROUNDED def search(args): index = get_package_index() + installed = installed_libs() - matching_keys = [key for key in index if args.query in key] + matching_keys = [key for key in index if args.query in key and not (not args.show_installed and key in installed)] if args.limit >= 0: matching_keys = matching_keys[:args.limit]