dotfiles/.local/bin/scripts/cj
2022-07-18 11:56:48 +01:00

5 lines
238 B
Bash
Executable file

#!/bin/sh
# [c]at the given files as prettified [j]son
# add echo in case file is missing newline at the end
{ cat "$@"; echo; } | while read -r line; do echo -n "$line" | python3 -m json.tool; done | bat --language json --style numbers