|
|
@ -1,9 +1,8 @@
|
|
|
|
# get the name of the branch we are on
|
|
|
|
# get the name of the branch we are on
|
|
|
|
function git_prompt_info() {
|
|
|
|
function git_prompt_info() {
|
|
|
|
|
|
|
|
if [[ -d .git ]]; then
|
|
|
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
|
|
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
|
|
|
branch=${ref#refs/heads/}
|
|
|
|
branch=${ref#refs/heads/}
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -d .git ]]; then
|
|
|
|
|
|
|
|
CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}%{$fg[red])"
|
|
|
|
CURRENT_BRANCH="%{$fg[red]%}git:(%{$fg[green]${branch}%{$fg[red])"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
CURRENT_BRANCH=''
|
|
|
|
CURRENT_BRANCH=''
|
|
|
|