Skip to content

Commit

Permalink
prettybad: Have yq output tabs instead of spaces
Browse files Browse the repository at this point in the history
It's a hack with `sed`, but it's better than nothing.
  • Loading branch information
eth-p committed Aug 24, 2024
1 parent 1cffc91 commit 6092fa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/prettybat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $?
}

Expand Down

0 comments on commit 6092fa5

Please sign in to comment.