1
1
forked from extern/flakelight

Have formatters for each file run in parallel

This commit is contained in:
Archit Gupta 2023-08-28 19:57:26 -07:00
parent 84162f4098
commit e5db2dcd86

View File

@ -20,14 +20,15 @@ in
PATH=${lib.makeBinPath (config.devShell.packages pkgs)}
for f in "$@"; do
if [ -d "$f" ]; then
${fd}/bin/fd "$f" -Htf -x "$0"
${fd}/bin/fd "$f" -Htf -x "$0" &
else
case "$(${coreutils}/bin/basename "$f")" in
${toString (mapAttrsToList
(n: v: "${n}) ${v} \"$f\";;") (config.formatters pkgs))}
(n: v: "${n}) ${v} \"$f\" & ;;") (config.formatters pkgs))}
esac
fi
done &>/dev/null
wait
'';
};