salmon-account-74572
03/24/2020, 4:21 PMpowerline-go
(https://github.com/justjanne/powerline-go/) that shows the currently selected Pulumi stack in my Powerline prompt. ๐green-morning-1318
03/24/2020, 4:48 PMPOWERLEVEL9K_CUSTOM_PULUMI_STACK="zsh_pulumi_stack"
POWERLEVEL9K_CUSTOM_PULUMI_STACK_BACKGROUND="blue"
POWERLEVEL9K_CUSTOM_PULUMI_STACK_FOREGROUND="black"
zsh_pulumi_stack(){
if test -f "Pulumi.yaml"; then
local stackname=$(pulumi stack | grep "Current stack is" | sed 's/://g' | sed 's/Current stack is//g')
echo -n "%F{black}Stack: $stackname"
fi
}
You can add it to your prompt elements with custom_pulumi_stack
salmon-account-74572
03/24/2020, 4:50 PMzsh
. ๐green-morning-1318
03/24/2020, 4:51 PMsalmon-account-74572
03/24/2020, 4:51 PMbash
guy.green-morning-1318
03/24/2020, 4:53 PMsalmon-account-74572
03/24/2020, 4:54 PMpowerline-go
is actually written in Go, so maybe don't bother with Bash? ๐green-morning-1318
03/24/2020, 4:58 PMsalmon-account-74572
03/24/2020, 5:00 PMgreen-morning-1318
03/24/2020, 5:19 PMsalmon-account-74572
03/24/2020, 5:23 PMbillowy-army-68599
salmon-account-74572
03/24/2020, 6:01 PM