diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2023-11-04 18:38:46 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-11-04 18:38:46 -0700 |
commit | 4d908094fdc2a0c0e9a0a072eba213fab7adef43 (patch) | |
tree | 7c17e70bcdeebbe96c84d849bdf17882007480d8 /themes/agnoster.zsh-theme | |
parent | 4b0bbc0b263a150eb9a9b59f196914629be06a9b (diff) | |
parent | 632ed413a9ce62747ded83d7736491b081be4b49 (diff) | |
download | zsh-master.tar.gz zsh-master.tar.bz2 zsh-master.zip |
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r-- | themes/agnoster.zsh-theme | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 3abd9f799..af0c33754 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -109,7 +109,9 @@ prompt_git() { if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then repo_path=$(git rev-parse --git-dir 2>/dev/null) dirty=$(parse_git_dirty) - ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" + ref=$(git symbolic-ref HEAD 2> /dev/null) || \ + ref="◈ $(git describe --exact-match --tags HEAD 2> /dev/null)" || \ + ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" if [[ -n $dirty ]]; then prompt_segment yellow black else |