From ce0559e9d8b3e7ac385456c80fbdba7284b2dcef Mon Sep 17 00:00:00 2001 From: relikd Date: Tue, 9 Sep 2025 15:27:41 +0200 Subject: [PATCH] feat: list --primary --- brew.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/brew.py b/brew.py index f0fef64..1257d8b 100755 --- a/brew.py +++ b/brew.py @@ -189,6 +189,8 @@ def cli_list(args: ArgParams) -> None: packages = [x for x in packages if len(x.allVersions) > 1] if args.pinned: packages = [x for x in packages if x.pinned] + if args.primary: + packages = [x for x in packages if x.primary] if not packages: Log.main('no package found.') return @@ -677,10 +679,12 @@ def parseArgs() -> ArgParams: cmd.arg_bool('-1', help=''' Force output to be one entry per line. This is the default when output is not to a terminal.''') + cmd.arg_bool('--primary', help=''' + Only show packages which were requested by user, no dependencies.''') cmd.arg_bool('--multiple', help=''' Only show packages with multiple versions installed''') cmd.arg_bool('--pinned', help=''' - List only pinned packages. See also pin, unpin.''') + Only show pinned packages. See also pin, unpin.''') # outdated cmd = cli.subcommand('outdated', cli_outdated, aliases=['old'])