I have a separate folder "terraform_lab2" where i run my terraform scripts. I'd like to have terraform aliased to "t" or "ter" whenever i startup only that specific workspace in vscode.
I tried to create temp alias, typed in intergrated bash terminal:
alias terraform=ter
but it's not working. How to make it work in this specific project folder/vscode workspace?
CodePudding user response:
you need to add this to .bashrc
PROMPT_COMMAND='if [[ "$bashrc" != "$PWD" && "$PWD" != "$HOME" && -e .bashrc ]]; then bashrc="$PWD"; . .bashrc; fi'
for windows, follow this link https://wahlnetwork.com/2020/07/07/windows-aliases-for-terraform-and-git/