1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-20 10:51:13 +00:00
prezto/modules/aws/functions/aws-info

22 lines
429 B
Plaintext
Raw Normal View History

#
# Exposes information about the AWS_PROFILE environment via the $aws_info associative
# array.
#
# function aws-info {
local profile_format
local profile_formatted
unset aws_info
typeset -gA aws_info
if [[ -n "$AWS_PROFILE" ]]; then
zstyle -s ':prezto:module:aws:info:profile' format 'profile_format'
zformat -f profile_formatted "$profile_format" "v:${AWS_PROFILE:t}"
aws_info[profile]="$profile_formatted"
fi
# }