Created
December 19, 2014 00:37
-
-
Save RichardLitt/d188954e5d3ee7fb0a93 to your computer and use it in GitHub Desktop.
How to show a radioactive icon if the current dir has a git stash
This file contains hidden or 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
| parse_git_stash() { | |
| [[ $(git stash list 2> /dev/null | tail -n1) != "" ]] && echo ' \[\e[0;31m\]☣' | |
| } | |
| set_bash_prompt(){ | |
| PS1="\A \w$(parse_git_stash) \[\e[0m\]$ " | |
| } | |
| PROMPT_COMMAND=set_bash_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment