refactor(prompt): Move set term title to precmd
Moved the setTermTitle function call out of the prompt line and into the precmd hook. This shortens the non-visible length of the prompt line and also makes the functionality clearer
This commit is contained in:
parent
ab222a30c7
commit
91252d1b54
3
prompt
3
prompt
|
|
@ -26,9 +26,10 @@ zstyle ':vcs_info:git*' actionformats "-(%{%F{203}%} %{%f%}%s:%{%F{2}%}שׂ %{
|
||||||
## precmd runs before every prompt
|
## precmd runs before every prompt
|
||||||
precmd() {
|
precmd() {
|
||||||
vcs_info
|
vcs_info
|
||||||
|
setTermTitle "($(whoami)@$(hostname) $(pwd))"
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT="$(setTermTitle "(%n@%m %2~)")╭╼(%{%F{81}%}%n%{%F{245}%}@%{%F{206}%}%m %{%F{245}%}%2~%{%F{259}%})─(%(?.😎.😞 %?))"$'\n'"╰┤"
|
PROMPT="╭╼(%{%F{81}%}%n%{%F{245}%}@%{%F{206}%}%m %{%F{245}%}%2~%{%F{259}%})─(%(?.😎.😞 %?))"$'\n'"╰┤"
|
||||||
export RPROMPT='${vcs_info_msg_0_}'
|
export RPROMPT='${vcs_info_msg_0_}'
|
||||||
|
|
||||||
# vim: set ft=zsh:
|
# vim: set ft=zsh:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user