summary refs log tree commit diff stats
path: root/user/zsh
diff options
context:
space:
mode:
authorAlan Pearce2023-04-09 14:15:21 +0200
committerAlan Pearce2023-04-09 14:15:21 +0200
commit7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b (patch)
tree955b4f3075a05588fbd88424fc4cff545da9550b /user/zsh
parentd67ca36a15fdfbc4a7df530a9316f442d482e839 (diff)
downloadnixfiles-7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b.tar.lz
nixfiles-7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b.tar.zst
nixfiles-7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b.zip
zsh: disable right prompt for SSH clients
Diffstat (limited to 'user/zsh')
-rw-r--r--user/zsh/zshrc9
1 files changed, 6 insertions, 3 deletions
diff --git a/user/zsh/zshrc b/user/zsh/zshrc
index 08b67af9..cd5a4986 100644
--- a/user/zsh/zshrc
+++ b/user/zsh/zshrc
@@ -103,7 +103,6 @@ else
   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'