mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-11-20 09:41:12 +00:00
14 lines
235 B
Plaintext
14 lines
235 B
Plaintext
|
#compdef aws_switch_profile
|
||
|
#autoload
|
||
|
|
||
|
if [[ ! -f ~/.aws/credentials ]]; then
|
||
|
return 1
|
||
|
fi
|
||
|
|
||
|
local profiles
|
||
|
profiles=$(grep -E "^\[.+\]" ~/.aws/credentials | tr -d '[' | tr -d ']' )
|
||
|
|
||
|
_arguments "1:toggle:((
|
||
|
$profiles
|
||
|
))" && return 0
|