From: Paul Hänsch Date: Fri, 7 Nov 2025 00:21:14 +0000 (+0100) Subject: Feature: allow globbing in `attachment` macro X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=8f35578b8a964c15f1f3c86eefd01c57e2a5b53a;p=shellwiki Feature: allow globbing in `attachment` macro --- 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 ''