diff --git a/.functions b/.functions index 4b66cd3..d91a69b 100644 --- a/.functions +++ b/.functions @@ -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; }