From dc0ba282b6e41c1c4b2dfba2ea362cf88a7f8c29 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 25 Jan 2017 12:04:24 +1300 Subject: Be more specific in ref name trimming e.g. for a namespaced branch "foo/bar/bar", don't strip the leading part off --- zsh/zshrc.d/prompt.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zsh') diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh index a22739d3..cfac7ffd 100644 --- a/zsh/zshrc.d/prompt.zsh +++ b/zsh/zshrc.d/prompt.zsh @@ -67,7 +67,7 @@ prompt() { git describe --tags --exact-match HEAD || git rev-parse --short HEAD ) || return - name=${name##*/} + name=${name#refs/*/} [[ -n $name ]] || return # Check various files in .git to flag processes -- cgit v1.2.3