mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 18:39:26 +00:00
[aws/sorinmod] Show aws profile in prompt
This commit is contained in:
21
modules/aws/functions/aws-info
Normal file
21
modules/aws/functions/aws-info
Normal file
@ -0,0 +1,21 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
# }
|
Reference in New Issue
Block a user