Skip to content

Instantly share code, notes, and snippets.

# based on - https://gist.github.com/albertogalan/957a11d15c385c07d0be219a3fbf984c
# background - https://gist.github.com/jbriales/ea475a155f1f7bbb6731e39e8764f1d1
function jq() {
if [ -f $1 ]; then
FILE=$1; shift
# Move FILE at the end as expected by native jq
command jq "$@" "$FILE"
else
command jq "$@"