From 6092fa5bad9fa10761ca81af124d1c5c0381a16d Mon Sep 17 00:00:00 2001 From: "Ethan P." Date: Sat, 24 Aug 2024 14:22:18 -0700 Subject: [PATCH] prettybad: Have `yq` output tabs instead of spaces It's a hack with `sed`, but it's better than nothing. --- src/prettybat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/prettybat.sh b/src/prettybat.sh index 335a96a..902d884 100755 --- a/src/prettybat.sh +++ b/src/prettybat.sh @@ -207,7 +207,8 @@ formatter_yq_process() { *.json) args+=(--output-format json) ;; esac - yq --prettyPrint --indent 2 "${args[@]}" + yq --prettyPrint --indent 4 "${args[@]}" \ + | sed -e ':l' -e 's/^\(\t*\) /\1\t/g; t l' return $? }