commit c732358259ac5a89f99b18effbc27527ee621991
parent 8fabab94baefae33454ab9e6c59529166ec1a6b6
Author: pyratebeard <root@pyratebeard.net>
Date: Mon, 9 Jun 2025 10:59:09 +0100
style(zsh): ignore git tags. add icons to branch display
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/zsh/.config/zsh/prompt.zsh b/zsh/.config/zsh/prompt.zsh
@@ -48,10 +48,10 @@ GIT_PROMPT() {
return
fi
ref=$(git name-rev --name-only HEAD | sed 's!remotes/!!' 2> /dev/null)
- if [[ ${ref} == "tags"* ]] ; then
- branch=$(git branch | grep -e "^*" | tr -d "*")
- ref="${branch/ /} ${ref}"
- fi
+ #if [[ ${ref} == "tags"* ]] ; then
+ branch=$(git branch | grep -e "^*" | tr -d "* ")
+ ref="\ue725${branch/ /} \ue729${ref}"
+ #fi
dirty="" && [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && dirty=$ICO_DIRTY
stat=$(git status | sed -n 2p)
case "$stat" in
@@ -73,7 +73,7 @@ GIT_PROMPT() {
echo "${COLOR_NORMAL}─["${ref}${dirty}${stat}"]"
;;
tiny)
- echo "%F{241} [%F{244}"${ref}${dirty}${stat}"%F{241}]"
+ echo "%F{241} [ %F{244}"${ref}${dirty}${stat}"%F{241}]"
;;
*)
echo "${USER_LEVEL}─[${COLOR_NORMAL}"${ref}${dirty}${stat}"${USER_LEVEL}]"