From b19f8ec039210607f542d6324b2dd6a3663cb02b Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Sat, 6 Jun 2026 08:48:04 -0500 Subject: [PATCH] Usage! --- plugins/labels.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/plugins/labels.py b/plugins/labels.py index bb5b1a6..60f6e08 100644 --- a/plugins/labels.py +++ b/plugins/labels.py @@ -65,11 +65,14 @@ action_map = { } def modify_labels(lib, opts, args): + if not args: + labels_command.parser.print_usage() + return + action = args[0] if action not in action_map: - print_("%s is not a valid action. " % action) - print_("Valid actions are: add, remove, removeall, show, transfer, edit") + print_("%s is not a valid action. Run 'beet labels --help' for usage." % action) return actnum = action_map[action] @@ -297,7 +300,20 @@ def edit_labels(lib, opts, args): print_(f"Updated {len(changes)} item(s).") -labels_command = Subcommand('labels', help='Add or remove labels') +labels_command = Subcommand( + 'labels', + help='Add, remove, or inspect labels on library items' +) +labels_command.parser.usage = """%prog [args] [query] + +Actions: + add