Last active
May 19, 2023 19:21
-
-
Save pjaudiomv/2e21938d9047ddbd899c695bf0e31bca to your computer and use it in GitHub Desktop.
zshrc tf info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# terraform info | |
local tf_info='$(tf_workspace)' | |
function tf_workspace { | |
if [ -f ".terraform/environment" ]; then | |
local workspace=$(cat .terraform/environment); | |
echo -n "%{$fg_bold[green]%}tf:%{$fg[cyan]%}${workspace}%{$fg_bold[green]%}%{$reset_color%}" | |
else | |
echo -n "" | |
fi | |
} | |
# AWS info | |
local aws_info='$(aws_prof)' | |
function aws_prof { | |
local profile="${AWS_PROFILE:=}" | |
if [ -z "$profile" ] | |
then | |
echo -n "" | |
else | |
echo -n "%{$fg_bold[blue]%}aws:%{$fg[cyan]%}${profile}%{$fg_bold[blue]%}%{$reset_color%}" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment