This commit is contained in:
Josef Utbult 2025-01-07 23:59:11 +01:00 committed by GitHub
commit f36aa6a40e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -8479,6 +8479,12 @@ _p9k_init_ssh() {
if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then
P9K_SSH=1 P9K_SSH=1
return 0 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 fi
# When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost. # When changing user on a remote system, the $SSH_CONNECTION environment variable can be lost.