fix prompt builder overriding mobile prompts

This commit is contained in:
Nicole O'Connor
2024-07-02 18:58:53 -07:00
parent e29862ff82
commit 96c7934a83
2 changed files with 16 additions and 18 deletions

View File

@@ -20,5 +20,19 @@ function rprompt_builder () {
print "${result}"
}
PROMPT='$(prompt_builder)'
RPROMPT='$(rprompt_builder)'
if [[ $cols -lt 80 ]]; then
if [[ $(uname -o) == "Android" ]]; then
hostemoji="📞"
else
hostemoji="🖥"
fi
PROMPT="👤%{$fg_bold[white]%}@${hostemoji} %~ %# %{$reset_color%}"
else
PROMPT='$(prompt_builder)'
RPROMPT='$(rprompt_builder)'
fi
TMOUT=60
TRAPALRM () {
zle reset-prompt
}