1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-20 08:31:13 +00:00
prezto/modules/aws/functions/aws-info
2019-11-06 17:28:19 +01:00

22 lines
429 B
Plaintext

#
# 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
# }