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
|
|
@ -62,8 +62,14 @@ local branch="\$(parse_git_branch)"
|
||||||
local exit_code="%(?..${red}%?%f)"
|
local exit_code="%(?..${red}%?%f)"
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
if [[ $LOCAL_SESSION -eq 1 ]]; then
|
||||||
export PROMPT="${prompt}"
|
export PROMPT="${prompt}"
|
||||||
export RPROMPT="${exit_code} ${lbrkt}${user}${colon}${host}${colon}${dir}${branch}${rbrkt}"
|
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
|
# aliases
|
||||||
source $HOME/.config/zsh/aliases
|
source $HOME/.config/zsh/aliases
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue