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
# echo the current git branch if in git repo | |
function mygitbranch() { | |
if git status 1> /dev/null 2>&1 | |
then | |
gsFirstLine="$(git status | head -1)" | |
echo "${gsFirstLine##* }" | |
fi | |
} | |
# echo '(' if in git repo |