1
0
mirror of https://github.com/DazAh/dotfiles synced 2026-05-21 18:25:46 +01:00

upgradeohmyzsh

This commit is contained in:
DazAh
2020-12-13 21:56:15 +00:00
parent d70caf476c
commit d997f114fa
52 changed files with 2509 additions and 1831 deletions
@@ -11,11 +11,11 @@ def get_tagname_or_hash():
"""return tagname if exists else hash"""
# get hash
hash_cmd = ['git', 'rev-parse', '--short', 'HEAD']
hash_ = check_output(hash_cmd).strip()
hash_ = check_output(hash_cmd).decode('utf-8').strip()
# get tagname
tags_cmd = ['git', 'for-each-ref', '--points-at=HEAD', '--count=2', '--sort=-version:refname', '--format=%(refname:short)', 'refs/tags']
tags = check_output(tags_cmd).split()
tags = check_output(tags_cmd).decode('utf-8').split()
if tags:
return tags[0] + ('+' if len(tags) > 1 else '')