From 7a3b92407ed8af3cedd9ee27334f62b4e6ee5d5b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 9 Apr 2023 14:15:21 +0200 Subject: zsh: disable right prompt for SSH clients --- user/zsh/zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'user/zsh') 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' -- cgit 1.4.1