2010-12-05 12:50:00 +01:00
|
|
|
# -*- mode: shell-script -*-
|
|
|
|
|
|
|
|
if [ -n "$__CURRENT_GIT_BRANCH" ]; then
|
|
|
|
local s="("
|
|
|
|
s+="$__CURRENT_GIT_BRANCH"
|
|
|
|
case "$__CURRENT_GIT_BRANCH_STATUS" in
|
|
|
|
ahead)
|
2011-05-17 00:53:52 +02:00
|
|
|
s+="↑"
|
2010-12-05 12:50:00 +01:00
|
|
|
;;
|
|
|
|
diverged)
|
2011-05-17 00:53:52 +02:00
|
|
|
s+="↕"
|
2010-12-05 12:50:00 +01:00
|
|
|
;;
|
|
|
|
behind)
|
2011-05-17 00:53:52 +02:00
|
|
|
s+="↓"
|
2010-12-05 12:50:00 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if [ -n "$__CURRENT_GIT_BRANCH_IS_DIRTY" ]; then
|
2011-05-17 00:53:52 +02:00
|
|
|
s+="⚡"
|
2010-12-05 12:50:00 +01:00
|
|
|
fi
|
|
|
|
s+=")"
|
|
|
|
|
|
|
|
printf " %s%s" "%{${fg[yellow]}%}" $s
|
|
|
|
fi
|