Closed Ipswitch closed 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
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
I'll take a look at this soon and test it out, then we can get it merged.
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