Created
June 28, 2018 06:13
-
-
Save ApolloZhu/97d404c67b2d4d066d5c2859d8e743fb to your computer and use it in GitHub Desktop.
Basically PS1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prompt_status() { | |
local symbols | |
symbols=() | |
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘ 🤯 " | |
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡ 😎 " | |
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙ 🤔 " | |
if [[ -n "$symbols" ]] ; then | |
prompt_segment black default "$symbols" | |
else | |
prompt_segment black default "🧐 " | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment