From de1dd4d4a599ec70dc649e0fd06ae063bbe62ab6 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Tue, 15 May 2018 15:01:07 -0700 Subject: [PATCH] Don't use zsh RPROMPT if ssh'd --- zsh/.zshrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 7640760..e5ce250 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -62,8 +62,14 @@ local branch="\$(parse_git_branch)" local exit_code="%(?..${red}%?%f)" setopt prompt_subst -export PROMPT="${prompt}" -export RPROMPT="${exit_code} ${lbrkt}${user}${colon}${host}${colon}${dir}${branch}${rbrkt}" +if [[ $LOCAL_SESSION -eq 1 ]]; then + export PROMPT="${prompt}" + export RPROMPT="${exit_code} ${lbrkt}${user}${colon}${host}${colon}${dir}${branch}${rbrkt}" +else + export PROMPT="${lbrkt}${user}${colon}${host}${colon}${dir}${branch}${rbrkt} ${exit_code} +${prompt}" + export RPROMPT="" +fi # aliases source $HOME/.config/zsh/aliases