Fix git (HEAD detached at ...) bash prompt
This commit is contained in:
parent
892c27637a
commit
18007bc022
1 changed files with 1 additions and 1 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Reference in a new issue