diff options
author | David Wührer <def@gmx.at> | 2023-05-13 18:02:41 +0200 |
---|---|---|
committer | David Wührer <def@gmx.at> | 2023-05-13 18:02:41 +0200 |
commit | 044b08d127cef08545f831a0c4960d450680679b (patch) | |
tree | 6baf9e8ef213137dacfba6ebb7169cbdb3720a4a | |
parent | 9bd7b1078f0d23bd452110451d1762f118e99fbf (diff) |
improve reduce
-rwxr-xr-x | reduce | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}" |