Skip to content

Show git tag instead of hash #510

Answered by ericbn
palango asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @palango. Our asciitheme is inspired by starship, and as far as I've used that theme, it also does not show the tag name by default, so that's why we kept our theme that way.

You can customize asciiship to show the commits from nearest tag count (when in 'detached HEAD' state) using:

  zstyle ':zim:git-info:position' format 'HEAD %F{green}(%p)'
  zstyle ':zim:git-info:keys' format \
      'status' '%S%I%i%A%B' \
      'prompt' ' on %%B%F{magenta}%b%p%s${(e)git_info[status]:+" %F{red}[${(e)git_info[status]}]"}%f%%b'

Our themes use our git-info module to show git information. You can learn more about how to customize it by checking its settings documentation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@palango
Comment options

Answer selected by palango
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants