From 825c739cc2f6824a890daf1c97fc481b5c496b29 Mon Sep 17 00:00:00 2001 From: Matthew Winter <33818+wintermi@users.noreply.github.com> Date: Sun, 14 May 2023 17:06:26 +1000 Subject: [PATCH] feat: simplify 'zap version' output and use non-bold colours --- zap.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zap.zsh b/zap.zsh index 8693ad6..5ee2f85 100644 --- a/zap.zsh +++ b/zap.zsh @@ -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() {