Skip to content

Instantly share code, notes, and snippets.

@rcmdnk
Last active December 15, 2015 03:59
Show Gist options
  • Save rcmdnk/5198842 to your computer and use it in GitHub Desktop.
Save rcmdnk/5198842 to your computer and use it in GitHub Desktop.
Face mark for command prompt
PS1="\$(\
ret=\$?
rand=\$((RANDOM%36));\
if [ \$ret -eq 0 ];then\
if [ \$rand -lt 3 ];then
printf '\[\e[m\](^_^)\[\e[m\] \$ ';\
elif [ \$rand -lt 5 ];then\
printf '\[\e[m\](^_-)\[\e[m\] \$ ';\
elif [ \$rand -lt 6 ];then\
printf '\[\e[m\](.^.)\[\e[m\] \$ ';\
else\
printf '\[\e[m\](-_-)\[\e[m\] \$ ';\
fi;\
else\
if [ \$rand -lt 6 ];then\
printf '\[\e[31m\](@o@)\[\e[m\] \$ ';\
elif [ \$rand -lt 12 ];then\
printf '\[\e[31;1m\](>_<)\[\e[m\] \$ ';\
elif [ \$rand -lt 18 ];then\
printf '\[\e[35m\](*_*)\[\e[m\] \$ ';\
elif [ \$rand -lt 24 ];then\
printf '\[\e[34m\](T_T)\[\e[m\] \$ ';\
elif [ \$rand -eq 30 ];then\
printf '\[\e[34;1m\](/_T)\[\e[m\] \$ ';\
else\
printf '\[\e[31m\](>_<)\[\e[m\] \$ ';\
fi\
fi;\
)"
@rcmdnk
Copy link
Author

rcmdnk commented Mar 19, 2013

See demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment