Skip to content

Commit

Permalink
feat: simplify 'zap version' output and use non-bold colours
Browse files Browse the repository at this point in the history
  • Loading branch information
wintermi committed May 14, 2023
1 parent 788790e commit 825c739
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ OPTIONS:
}

function _zap_version() {
local -Ar color=(BLUE "\033[1;34m" GREEN "\033[1;32m" RESET "\033[0m")
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`)
echo "⚡ Zap - Version\n\nBranch: ${color[GREEN]}${_branch}${color[RESET]}\nVersion: ${color[GREEN]}${_version}${color[RESET]}"
git -C "$ZAP_DIR" log -1 --pretty="Commit Hash: %C(bold blue)%h%Creset %nCommitted When: %C(bold blue)%cr%Creset"
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]}"
}

function zap() {
Expand Down

0 comments on commit 825c739

Please sign in to comment.