From 044b08d127cef08545f831a0c4960d450680679b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20W=C3=BChrer?= Date: Sat, 13 May 2023 18:02:41 +0200 Subject: improve reduce --- reduce | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'reduce') diff --git a/reduce b/reduce index 2e7269c..b9b69fe 100755 --- a/reduce +++ b/reduce @@ -1,9 +1,9 @@ #!/bin/bash fn=$1 -f() { eval "$fn $*"; } +f() { eval "$fn" "$@"; } a=$2 b=$3 shift 3 [[ -z "$b" ]] && exec echo "$a" -exec "$0" "$fn" "$(f "$a" "$b")" "$@" +exec "$0" "$fn" "$(f "$a" "$b")" "${@@Q}" -- cgit v1.2.3