Changed the parser_git_branch

This commit is contained in:
Marcin Woźniak 2022-07-18 20:57:39 +02:00
parent cdbab4fe6a
commit ce5b3672de
1 changed files with 7 additions and 2 deletions

9
.zshrc
View File

@ -3,8 +3,13 @@
CONFIG=$HOME/.config
parse_git_branch() {
command=$(git symbolic-ref --short HEAD 2> /dev/null)
[ -z $command ] && echo -e "$ " || echo -e "$(git symbolic-ref --short HEAD 2> /dev/null) $ "
command=$(git branch \
2> /dev/null \
| sed -n -e 's/^\* \(.*\)/\1/p' \
| awk 'NF{print $NF}' \
| sed 's/)//g' \
2> /dev/null)
[ -z $command ] && echo -e "$ " || echo -e "$command $ "
}
gbranch() {