Unverified Commit 0726c109 authored by Hans Donner's avatar Hans Donner Committed by GitHub

fix(aws): allow non-space characters in profile names (#11040)

parent ef8e63a7
...@@ -147,7 +147,7 @@ function aws_change_access_key() { ...@@ -147,7 +147,7 @@ function aws_change_access_key() {
function aws_profiles() { function aws_profiles() {
[[ -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:]]*([-_[:alnum:]\.@]+)\][[:space:]]*$/\2/g' grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([^[:space:]]+)\][[:space:]]*$/\2/g'
} }
function _aws_profiles() { function _aws_profiles() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment