From e9fe156a3105df0f4f28e4b5a9cc2ead991fec75 Mon Sep 17 00:00:00 2001 From: Drew Stokes Date: Mon, 11 Feb 2013 16:03:15 -0800 Subject: [PATCH] add tag names to git prompt --- lib/git.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git.zsh b/lib/git.zsh index 3e14695bd..b14f90f35 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -1,6 +1,7 @@ # get the name of the branch we are on function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || \ + ref=$(git describe --tags --exact-match HEAD 2> /dev/null) || \ ref=$(git rev-parse --short HEAD 2> /dev/null) || return echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" }