Skip to content

Instantly share code, notes, and snippets.

@jaysonrowe
jaysonrowe / git-ps1-bashrc.sh
Created May 9, 2012 11:57 — forked from ebassi/git-ps1-bashrc.sh
enhancing __git_ps1 with a blacklist
# pretty hacky wrapper around __git_ps1 that checks directories in a blacklist
__git_maybe_ps1 ()
{
local cur_dir=$( basename $( pwd ))
local print_ps1='yes'
for black in ${GIT_PS1_BLACKLIST}; do
if [[ "${cur_dir}" == *${black}* ]]; then
print_ps1='no'
break;
fi