mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-16 11:36:16 +08:00
fix(terraform): add command guard and document missing aliases
- Add command existence check at the top of the plugin to prevent aliases and functions from being created when terraform is not installed, consistent with other plugins (e.g. bun, volta, gh) - Add missing `tfapp` and `tfpo` aliases to the README documentation
This commit is contained in:
parent
70ad5e3df8
commit
7829040e32
@ -21,6 +21,7 @@ plugins=(... terraform)
|
||||
| `tfa` | `terraform apply` |
|
||||
| `tfa!` | `terraform apply -auto-approve` |
|
||||
| `tfap` | `terraform apply -parallelism=1` |
|
||||
| `tfapp` | `terraform apply tfplan` |
|
||||
| `tfc` | `terraform console` |
|
||||
| `tfd` | `terraform destroy` |
|
||||
| `tfd!` | `terraform destroy -auto-approve` |
|
||||
@ -33,6 +34,7 @@ plugins=(... terraform)
|
||||
| `tfiur` | `terraform init -upgrade -reconfigure` |
|
||||
| `tfo` | `terraform output` |
|
||||
| `tfp` | `terraform plan` |
|
||||
| `tfpo` | `terraform plan -out tfplan` |
|
||||
| `tfv` | `terraform validate` |
|
||||
| `tfs` | `terraform state` |
|
||||
| `tft` | `terraform test` |
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
# Return immediately if terraform is not found
|
||||
if (( ! ${+commands[terraform]} )); then
|
||||
return
|
||||
fi
|
||||
|
||||
function tf_prompt_info() {
|
||||
# dont show 'default' workspace in home dir
|
||||
[[ "$PWD" != ~ ]] || return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user