Skip to content

Commit

Permalink
Set GC_ACTIVE_CONFIG var
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuwow committed Dec 26, 2024
1 parent 1decec0 commit a06a51d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ if [ -f ~/.aws/current_profile ]; then
export AWS_PROFILE
fi

if [ -f ~/.config/gcloud/active_config ]; then
GC_ACTIVE_CONFIG="$(cat ~/.config/gcloud/active_config)"
export GC_ACTIVE_CONFIG
fi

# Version managers (asdf, aqua)
[[ -f "$BREW_PREFIX/opt/asdf/libexec/asdf.sh" ]] && . "$BREW_PREFIX/opt/asdf/libexec/asdf.sh"
export PATH=${AQUA_ROOT_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/aquaproj-aqua}/bin:$PATH
Expand Down
8 changes: 8 additions & 0 deletions .functions
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ prompt_aws() {
fi
}

prompt_gc() {
if [[ -n "${GC_ACTIVE_CONFIG}" ]]; then
GC_PROMPT=" <GC:${GC_ACTIVE_CONFIG}>"
else
GC_PROMPT=""
fi
}

prompts() {
if [ -z "$SSH_CLIENT" ]; then
PS1='localhost: \W\$ '
Expand Down

0 comments on commit a06a51d

Please sign in to comment.