rename function to parse git branch
This commit is contained in:
parent
93f3702cdd
commit
803c8594e4
1 changed files with 3 additions and 3 deletions
|
|
@ -157,7 +157,7 @@ gc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# get branch if available
|
# get branch if available
|
||||||
parse_git_branch() {
|
parse-git-branch() {
|
||||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,9 +169,9 @@ git-prune() {
|
||||||
|
|
||||||
# Set prompt
|
# Set prompt
|
||||||
if [ "$color_prompt" = yes ]; then
|
if [ "$color_prompt" = yes ]; then
|
||||||
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]\$(parse_git_branch)\[\033[00m\] \$ "
|
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]\$(parse-git-branch)\[\033[00m\] \$ "
|
||||||
else
|
else
|
||||||
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse_git_branch)\$ "
|
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse-git-branch)\$ "
|
||||||
fi
|
fi
|
||||||
unset color_prompt
|
unset color_prompt
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue