Skip to content

Instantly share code, notes, and snippets.

@turboBasic
Last active February 15, 2021 18:22
Show Gist options
  • Select an option

  • Save turboBasic/8336cf109cb65f991917c3273f9184c7 to your computer and use it in GitHub Desktop.

Select an option

Save turboBasic/8336cf109cb65f991917c3273f9184c7 to your computer and use it in GitHub Desktop.
List languages configured in Visual Studio Code #vscode #jq #shell
#!/bin/sh
jq -n '
inputs
| {"object": . , "filename": input_filename, "lineNumber": input_line_number}
' \
$(find extensions -maxdepth 2 -type f -name package.json) \
| jq -ns 'inputs' \
| jq '
.[]
| select(.object.contributes.languages)
| [ { filename, languages: .object.contributes.languages } ]
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment