zsh: visual tweaks to prompt
This commit is contained in:
parent
62dd4efc38
commit
3949848924
1 changed files with 6 additions and 7 deletions
|
@ -29,20 +29,19 @@ render_prompt() {
|
||||||
"$(render_exec_time)"
|
"$(render_exec_time)"
|
||||||
)
|
)
|
||||||
|
|
||||||
local separator="${zfg[gray]} ❯ "
|
local separator=" ${zfg[faded]}❯ "
|
||||||
echo ${(pj.$separator.)sections:#}
|
echo "${(@pj.$separator.)sections:#}${zfg[gray]}"
|
||||||
echo -n "${zfg[gray]}"
|
(($SHLVL > 1)) && printf '%.0s' {2..$SHLVL}
|
||||||
printf '❯%.0s' {1..$SHLVL}
|
echo -n "❯ ${zfg[rst]}"
|
||||||
echo -n "${zfg[rst]} "
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render_exit_code() {
|
render_exit_code() {
|
||||||
((PROMPT_EXIT_CODE == 0)) && return
|
((PROMPT_EXIT_CODE == 0)) && return
|
||||||
|
|
||||||
if ((PROMPT_EXIT_CODE > 128 && PROMPT_EXIT_CODE < 160)); then
|
if ((PROMPT_EXIT_CODE > 128 && PROMPT_EXIT_CODE < 160)); then
|
||||||
print "${fg_white}$(kill -l $PROMPT_EXIT_CODE)"
|
print "%{%B%}${zfg[white]}$(kill -l $PROMPT_EXIT_CODE)%{%b%}"
|
||||||
else
|
else
|
||||||
print "${fg_red}✘ $PROMPT_EXIT_CODE"
|
print "%{%B%}${zfg[red]}✘ $PROMPT_EXIT_CODE%{%b%}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue