Fix git (HEAD detached at ...) bash prompt

This commit is contained in:
Vladan Popovic 2019-12-28 21:57:17 +01:00
parent 892c27637a
commit 18007bc022
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ iploc () { curl -s http://ip-api.com/json/"$1"|tr , '\n'|sed 's/[\"{}]//g'; }
function parse_branch {
scmexe=${1:-git}
$scmexe branch 2> /dev/null | awk '/^*/{print "("$2")"}'
$scmexe branch 2> /dev/null | awk '/^*/{$1="";sub(/^ /, "");print "("$0")"}'
}
yell() { echo "$0: $*" >&2; }