cmur2 / language-terraform

Terraform.io support for Atom
MIT License
49 stars 32 forks source link

Key Terraform words created using bash #28

Closed Ipswitch closed 7 years ago

Ipswitch commented 7 years ago

git clone git@github.com:hashicorp/terraform.git; echo "'.source.terraform':" > ~/.atom/packages/language-terraform/snippets/keywords.cson; for fn in grep -rPo --include \*.go ./terraform/builtin -e "((?<=\")[a-zA-Z0-9,_]*(?=\":\W*{))|((?<=\")[a-zA-Z0-9,_]*(?=\":\W*(&schema\.Schema)))|(?<=\")[a-zA-Z0-9,_]*(?=\":\W*(dataSource|resource))" | cut -d':' -f2 | sort | uniq; do if ! grep -Fxq " '$fn':" ~/.atom/packages/language-terraform/snippets/snippets.cson; then echo -e " '$fn':\n 'prefix': '$fn'\n 'body': \"$fn\"\n"; fi; done >> ~/.atom/packages/language-terraform/snippets/keywords.cson; rm -rf terraform

GiantToast commented 7 years ago

I'll take a look at this soon and test it out, then we can get it merged.