From 5655adab7952a2e7da6aabbf1775e598eca11121 Mon Sep 17 00:00:00 2001 From: codeasier Date: Sat, 18 Apr 2026 13:31:55 +0800 Subject: [PATCH] fix: make --category implicitly trigger --list mode The --category option on its own should list templates in that category without requiring the redundant --list flag. Closes #30 --- src/pt_snap_cli/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pt_snap_cli/cli.py b/src/pt_snap_cli/cli.py index ea6665f..230fdcf 100644 --- a/src/pt_snap_cli/cli.py +++ b/src/pt_snap_cli/cli.py @@ -173,6 +173,10 @@ def query_database( list_by_category_with_details, ) + # Implicit list mode when --category is provided without --template-use + if category is not None and not list_templates and not template_use and not template_info: + list_templates = True + if list_templates: categories = ["basic", "statistical", "business"] category_labels = {