Skip to content

Commit

Permalink
Merge pull request #183 from zap-zsh/wintermi
Browse files Browse the repository at this point in the history
fix: correct the method used to obtain the version tag to focus on the current branch not across all branches
  • Loading branch information
wintermi authored Apr 9, 2024
2 parents 5eb1556 + e1a7c76 commit d8e74d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ OPTIONS:
function _zap_version() {
local -Ar color=(BLUE "\033[0;34m" GREEN "\033[0;32m" RESET "\033[0m")
local _branch=$(git -C "$ZAP_DIR" branch --show-current)
local _version=$(git -C "$ZAP_DIR" describe --tags `git -C "$ZAP_DIR" rev-list --tags --max-count=1`)
local _version=$(git -C "$ZAP_DIR" describe --abbrev=0 --tags)
local _commit=$(git -C "$ZAP_DIR" log -1 --pretty="%h (%cr)")
echo "⚡ Zap - Version\n\nVersion: ${color[GREEN]}${_branch}/${_version}${color[RESET]}\nCommit Hash: ${color[BLUE]}${_commit}${color[RESET]}"
}
Expand Down

0 comments on commit d8e74d3

Please sign in to comment.