From: Plom Heller Date: Mon, 1 Jun 2026 01:23:28 +0000 (+0200) Subject: Enforce .show on single-item listings. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/task?a=commitdiff_plain;h=HEAD;p=bricksplom Enforce .show on single-item listings. --- diff --git a/bricksplom.py b/bricksplom.py index 7f675e2..a8fe53c 100755 --- a/bricksplom.py +++ b/bricksplom.py @@ -684,6 +684,8 @@ class BricksDb: if filter_by: items = tuple(item for item in items if item.match(filter_by[0], filter_by[1:])) + if len(items) == 1 and not show_raw: + return items[0].show() return CHAR_NEWLINE.join( [(item.raw() if isinstance(item, Textfiled) and show_raw else str(item))