Skip to content

Instantly share code, notes, and snippets.

@RichardLitt
Created December 19, 2014 00:37
Show Gist options
  • Select an option

  • Save RichardLitt/d188954e5d3ee7fb0a93 to your computer and use it in GitHub Desktop.

Select an option

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
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