Open rafilkmp3 opened 5 years ago
Here's a simple custom one you can drop in your .zshrc
:
zsh_terraform() {
# break if there is no .terraform directory
if [[ -d .terraform ]]; then
local tf_workspace=$(/usr/local/bin/terraform workspace show)
echo -n "$tf_workspace"
fi
}
# Terraform Segment
POWERLEVEL9K_CUSTOM_TERRAFORM="zsh_terraform"
POWERLEVEL9K_CUSTOM_TERRAFORM_BACKGROUND=057
POWERLEVEL9K_CUSTOM_TERRAFORM_FOREGROUND=015
# Add terraform segment to your prompt
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_terraform)
Hi, I would like a segment for terraform workspace, here we have the plugin for zsh.
https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/terraform
to be able to do something like
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=('os_icon' 'todo' 'dir' 'vcs' 'terraform')