Compare commits

...

4 Commits

Author SHA1 Message Date
Josef Utbult f36aa6a40e
Merge 7563f920c7 into 3e2053a934 2025-01-07 23:59:11 +01:00
Seyed Sajjad (Sina) Tak Tehrani 3e2053a934
fix(prompt): add support for AWS_SSO_PROFILE in AWS segment initialization (#2813)
- Updated `_p9k_prompt_aws_init` to include `AWS_SSO_PROFILE` in the condition for activating the AWS segment.
- Ensures compatibility with AWS SSO profiles in addition to other AWS environment variables.
2025-01-06 03:24:25 -08:00
Josef Utbult 7563f920c7 Fix wrong variable name 2024-06-19 17:43:03 +02:00
Josef Utbult 4fc7271244 Try to fix wsl ssh issue 2024-06-19 17:39:23 +02:00
1 changed files with 7 additions and 1 deletions

View File

@ -1206,7 +1206,7 @@ prompt_aws() {
}
_p9k_prompt_aws_init() {
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}'
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${AWS_SSO_PROFILE:-${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}}'
}
################################################################
@ -8479,6 +8479,12 @@ _p9k_init_ssh() {
if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then
P9K_SSH=1
return 0
elif [[ \
$(grep -i Microsoft /proc/version) && \
$(cmd.exe /c 'echo %SSH_CLIENT%' 2>/dev/null | sed $'s/\r//' | grep ' 22$') \
]]; then
P9K_SSH=1
return 0
fi
# When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.