View JSON output in the command line using jq together with less. This makes JSON output more readable.
Use jq with less to make view JSON output better. Using -C
with jq will force colors, and -R
with less will print colors.
# For bash and zsh shells
alias jless='jq -C . | less -R"
# For fish shell
abbr jless 'jq -C . | less -R"
Use this jless
alias to make better sense of Docker's output:
docker ps --format '{{ json . }}' | jless