From 4fc72712440a11d71cdc24777af4e9ae7752eaaa Mon Sep 17 00:00:00 2001 From: Josef Utbult Date: Wed, 19 Jun 2024 17:39:23 +0200 Subject: [PATCH] Try to fix wsl ssh issue --- internal/p10k.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index d2d261b..f2da2f2 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -8473,7 +8473,13 @@ _p9k_init_ssh() { typeset -gix P9K_SSH=0 typeset -gx _P9K_SSH_TTY=$TTY if [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION ]]; then - P9K_SSH=1 + 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