vim-settings/scripts/sort-json.sh
2022-02-28 16:31:56 -08:00

8 lines
130 B
Bash
Executable File

#! /usr/bin/env bash
set -e
for f in "$@"; do
jq --sort-keys --monochrome-output . "$f" > "$f.tmp"
mv "$f.tmp" "$f"
done