From 8f35578b8a964c15f1f3c86eefd01c57e2a5b53a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 7 Nov 2025 01:21:14 +0100 Subject: [PATCH] Feature: allow globbing in `attachment` macro --- macros/attachments | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/macros/attachments b/macros/attachments index 3a75f86..4af3c09 100755 --- a/macros/attachments +++ b/macros/attachments @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2022 Paul Hänsch +# Copyright 2022, 2025 Paul Hänsch # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -18,26 +18,35 @@ . "$_EXEC/acl.sh" . "$_EXEC/tools.sh" -page="$1" - -if [ "${page#/}" = "$page" ]; then - page="$(PATH "${PATH_INFO}/$page")" -fi - -acl_read "$page" || exit 0 +[ $# = 0 ] && set -- "./*" printf %s\\n '' -- 2.39.5