oh-my-zsh/plugins/terraform/terraform.plugin.zsh
2018-04-05 15:11:41 +09:00

13 lines
328 B
Bash

function tf_prompt_info() {
# check if in terraform dir
if [ -d .terraform ]; then
workspace=$(terraform workspace show 2> /dev/null) || return
echo "[${workspace}]"
fi
}
if [ $commands[terraform] ]; then
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C terraform terraform
fi