Skip to content

Commit

Permalink
Use AWS_PROFILE variable for aws named profiles (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
RolfKoenders authored and salmanulfarzy committed Oct 9, 2018
1 parent 1895517 commit 720246d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ Docker section is shown only in directories that contain `Dockerfile` or `docker

### Amazon Web Services (AWS) (`aws`)

Shows selected Amazon Web Services profile using '[named profiles](http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html)'.
Shows selected Amazon Web Services profile configured using [`AWS_PROFILE`](http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html) variable.

| Variable | Default | Meaning |
| :------- | :-----: | ------- |
Expand Down
4 changes: 2 additions & 2 deletions sections/aws.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ spaceship_aws() {
spaceship::exists aws || return

# Is the current profile not the default profile
[[ -z $AWS_DEFAULT_PROFILE ]] || [[ "$AWS_DEFAULT_PROFILE" == "default" ]] && return
[[ -z $AWS_PROFILE ]] || [[ "$AWS_PROFILE" == "default" ]] && return

# Show prompt section
spaceship::section \
"$SPACESHIP_AWS_COLOR" \
"$SPACESHIP_AWS_PREFIX" \
"${SPACESHIP_AWS_SYMBOL}$AWS_DEFAULT_PROFILE" \
"${SPACESHIP_AWS_SYMBOL}$AWS_PROFILE" \
"$SPACESHIP_AWS_SUFFIX"
}

0 comments on commit 720246d

Please sign in to comment.