diff options
author | Alejandro Gandara <alex@alexgan.net> | 2021-07-15 00:52:22 +0300 |
---|---|---|
committer | Alejandro Gandara <alex@alexgan.net> | 2021-07-15 00:52:22 +0300 |
commit | f717a91f55f4d5dfb89d8828dc5b36fcc45548c2 (patch) | |
tree | 99406fc8ac6bff92a5e3daae9c040e3c1679b2c3 /config | |
parent | 1e7be00e04a6e34bdcc7574297413fd6a48be51f (diff) |
* Added new module for showing in prompt the active terraform version.
* Prompt shows, the terraform version in this format: Terraform v0.12.13 . If only if a valid terraform command is used, or an alias to it.
The use case: We have a need to constantly change between terraform versions depending on what project we are working on, it is easy to by mistake upgrade the wrong project to the latest terraform version. This is why the prompt is shown in red as soon as you type terraform, this is a good way to remind you to double check this is the terraform version you want to use.
Future improvements:
Detect current terraform version by checking the terraform workspace state version, and change the terraform color prompt from red to green if you're using the same version.
Diffstat (limited to 'config')
-rw-r--r-- | config/p10k-classic.zsh | 1 | ||||
-rw-r--r-- | config/p10k-lean-8colors.zsh | 1 | ||||
-rw-r--r-- | config/p10k-lean.zsh | 1 | ||||
-rw-r--r-- | config/p10k-rainbow.zsh | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 19c602bc..53dc0e66 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -70,6 +70,7 @@ haskell_stack # haskell version from stack (https://haskellstack.org/) kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) + terraform_version # It shows current active terraform version aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 9d0ab9a1..93a454d2 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -70,6 +70,7 @@ haskell_stack # haskell version from stack (https://haskellstack.org/) kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) + terraform_version # It shows current active terraform version aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 9d9dcf75..f6e48806 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -70,6 +70,7 @@ haskell_stack # haskell version from stack (https://haskellstack.org/) kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) + terraform_version # It shows current active terraform version aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 42b69929..71a1bfba 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -70,6 +70,7 @@ haskell_stack # haskell version from stack (https://haskellstack.org/) kubecontext # current kubernetes context (https://kubernetes.io/) terraform # terraform workspace (https://www.terraform.io) + terraform_version # It shows current active terraform version aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) |