Source

dotfiles / fish / functions / pj.fish

1
2
3
4
5
6
7
8
9
function pj -d "Prettify JSON"
    if test "$argv[1]" = "-C"
        # no color
        python -m json.tool
    else
        python -m json.tool | pygmentize -l json
    end
end