mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 21:39:48 +01:00
parent
ec0003f2fa
commit
eb2147c715
1 changed files with 1 additions and 0 deletions
|
@ -146,6 +146,7 @@ function aws_change_access_key() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function aws_profiles() {
|
function aws_profiles() {
|
||||||
|
aws --no-cli-pager configure list-profiles 2> /dev/null && return
|
||||||
[[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
|
[[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
|
||||||
grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([^[:space:]]+)\][[:space:]]*$/\2/g'
|
grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([^[:space:]]+)\][[:space:]]*$/\2/g'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue