]> glassweightruler.freedombox.rocks Git - xdg-ninja.git/commitdiff
Use printf in apply_shell_expansion
authorb3nj4m1n <b3nj4m1n@gmx.net>
Sat, 14 May 2022 10:47:44 +0000 (12:47 +0200)
committerb3nj4m1n <b3nj4m1n@gmx.net>
Sat, 14 May 2022 10:47:44 +0000 (12:47 +0200)
xdg-ninja.sh

index f173a57e02b6c95ab3466cd027e0521bdb657734..59d9dc41f9e6a2eb460847220745bcb8b7a44b7c 100755 (executable)
@@ -76,7 +76,7 @@ printf "\n"
 apply_shell_expansion() {
     data="$1"
     delimiter="__apply_shell_expansion_delimiter__"
-    command="cat <<$delimiter"$'\n'"$data"$'\n'"$delimiter"
+    command=$(printf "cat <<%s\n%s\n%s" "$delimiter" "$data" "$delimiter")
     eval "$command"
 }