Don't use zsh RPROMPT if ssh'd
This commit is contained in:
parent
f1e5077307
commit
de1dd4d4a5
1 changed files with 8 additions and 2 deletions
10
zsh/.zshrc
10
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue