Open sebneira opened 5 years ago
Any news on this PR?
@niechen: +1 for this PR
This PR has been open for half a year already. Are there any reviewers still alive?
Requires slight tweaks to covers usage of CLOUDSDK_ACTIVE_CONFIG_NAME
:
local gcp_profile=""
if [[ -n "${CLOUDSDK_ACTIVE_CONFIG_NAME}" && -f "$HOME/.config/gcloud/configurations/config_$CLOUDSDK_ACTIVE_CONFIG_NAME" ]]; then
gcp_profile="$CLOUDSDK_ACTIVE_CONFIG_NAME"
elif [[ -f "$HOME/.config/gcloud/active_config" ]]; then
gcp_profile=$(cat $HOME/.config/gcloud/active_config)
fi
Instead of plain gcp_profile=$(cat $HOME/.config/gcloud/active_config)
, and changing if [ -f "$HOME/.config/gcloud/active_config" ]; then
to if [ -n "${gcp_profile}" ]; then
.
And indeed, there wasn't any review/merge on this repository for a long time :(
@maoueh updated the PR with the changes you suggested. 2 years later, but better than never!
Any chance to get this merged?
Adds the GCP project in prompt (useful when moving between different projects).
Should I add a way to disable this prompt as not everyone might find it useful?