I found a script that almost takes care of a bit of clunkiness in git. I say almost, because when I use it, after it does what it's supposed to do, it breaks my shell, or something. After I use it, I can't use wildcards any more. I tried to run `jshint *.js` as I do a million times a day, but it says it can't find any such files. `ls` does the same thing. I can do `ls` by itself, and everything is there, but `ls *.js` or `ls *` just says the files aren't there. I tried googling, but to tell the truth, I don't have a clear idea of what to google for. "bash script breaks ls" didn't turn up anything useful. Can anyone tell me what is wrong with it?
green=`tput setaf 2`
reset=`tput sgr0`
git-branch-list() {
set -f
git branch | while read line; do
current=" "
name=${line##\* } ## removes leading * for current
if [ ! "$name" = "$line" ]; then
current="${green}* "
fi
description=`git config branch.$name.description`
if [ "$description" != "" ]; then
description=" : $description"
fi
echo "${reset}${current}${name}${description}${reset}"
done
}