From 32751c18604447ac5c4d6cab4dce5f96fa5f8aaa Mon Sep 17 00:00:00 2001 From: pvincent Date: Fri, 16 Aug 2019 00:37:53 +0400 Subject: [PATCH] prompt release tag git --- bash.bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash.bashrc b/bash.bashrc index 4304afb..2a6009e 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -109,7 +109,8 @@ __prompt_command() { if [[ $ahead -ne 0 ]]; then PS1+="${Blu}↑${ahead}" else - PS1+="${Gre}✔" + tag_release=`git describe --exact-match --tags $(git log -n1 --pretty='%h')` + PS1+="${Gre}✔${R}|${Blu}${tag_release}" fi fi PS1+="${R}]"