[feat] add reboot-required check to prompt_status

- use icon U+21BB
This commit is contained in:
liuderchi 2016-10-22 10:42:17 +08:00
parent c24dfa1ab4
commit cc41d07b86

View File

@ -208,6 +208,7 @@ prompt_status() {
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"
[[ -f /var/run/reboot-required ]] && symbols+="%{%F{yellow}%}↻"
[[ -n "$symbols" ]] && prompt_segment black default "$symbols" [[ -n "$symbols" ]] && prompt_segment black default "$symbols"
} }