all repos — nixfiles @ 7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b

System and user configuration, managed by nix and home-manager

zsh: disable right prompt for SSH clients
Alan Pearce alan@alanpearce.eu
Sun, 09 Apr 2023 14:15:21 +0200
commit

7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b

parent

d67ca36a15fdfbc4a7df530a9316f442d482e839

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M user/zsh/zshrcuser/zsh/zshrc
@@ -103,7 +103,6 @@ AGKOZAK_USER_HOST_DISPLAY=${+SSH_CLIENT}   AGKOZAK_SHOW_STASH=0
   AGKOZAK_SHOW_VIRTUALENV=0
   AGKOZAK_PROMPT_DIRTRIM=0
-  AGKOZAK_LEFT_PROMPT_ONLY=${+SSH_CLIENT}
 
   check_kubectl_context () {
     if [[ "$PWD" =~ satoshipay ]]
@@ -128,8 +127,12 @@ else       prompt_context=
     fi
   }
-  precmd_functions+=(check_kubectl_context)
-  AGKOZAK_CUSTOM_RPROMPT='${prompt_context}%(3V.%F{${AGKOZAK_COLORS_BRANCH_STATUS}%3v%f.)'
+  if [[ -z $SSH_CLIENT ]]
+  then
+    precmd_functions+=(check_kubectl_context)
+    AGKOZAK_LEFT_PROMPT_ONLY=${+SSH_CLIENT}
+    AGKOZAK_CUSTOM_RPROMPT='${prompt_context}%(3V.%F{${AGKOZAK_COLORS_BRANCH_STATUS}%3v%f.)'
+  fi
 fi
 
 export FZF_CTRL_T_COMMAND='(fd --hidden --follow --exclude ".git" .) 2> /dev/null'