Search code examples
jsondockercmdjqconemu

Jq doesn't highlight Docker inspect output


When executing docker-machine inspect command, instead of the expected highlighted version of JSON piped into jq:

enter image description here

I'm seeing the following plain output (in cmd or ConEmu):

enter image description here

Not sure what needs to be done to enable proper json highlighting.

This happens on Windows 10 machine on which jq ver. 1.5 was installed via Chocolatey:

enter image description here


Solution

  • Apparently, this is an idiosyncrasy of jq Windows implementation, forcing the color output with -C option, as hinted by several commenters above, resolved the issue for me:

    enter image description here