Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pulumi stack support #397

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jerome-probabl
Copy link

This PR add support for Pulumi Stack. It's really similar to Terraform workspace.

If you want to test it just use powerline-go with pulumi-stack module activate:

function _update_ps1() {
    PS1="$($GOPATH/bin/powerline-go -modules=venv,pulumi-stack,user,host,ssh,cwd,perms,git,jobs,exit -hostname-only-if-ssh -error $? -jobs $(jobs -p | wc -l))"

    # Uncomment the following line to automatically clear errors after showing
    # them once. This not only clears the error for powerline-go, but also for
    # everything else you run in that shell. Don't enable this if you're not
    # sure this is what you want.

    #set "?"
}

if [ "$TERM" != "linux" ] && [ -f "$GOPATH/bin/powerline-go" ]; then
    PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

Warning pulumi stack --show-name is not really fast so it can slowdown your prompt display, sadly there isn't other alternative to find the current stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant