I am trying to pipe curl
result to jq
then to Vim, but nothing happens.
If I follow the below method I get the desired result:
curl --location --request GET "$url/myproj/v1alpha1/consumption" --header "Authorization: Bearer $token" | vi -
then in Vim type the command to format.
:%!jq .
But if I do as below, piping the two commands to Vim, it doesn't work:
curl --location --request GET "$url/myproj/v1alpha1/consumption" --header "Authorization: Bearer $token" | jq | vi -
How to do it?