From 586978fe75d3534a057e79abd4f41a76a6a11426 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Wed, 31 Dec 2025 03:44:27 +0100 Subject: [PATCH] added git commit tracking to zsh theme --- dot_config/zsh/apex-neon.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dot_config/zsh/apex-neon.zsh b/dot_config/zsh/apex-neon.zsh index 629b1e9..830858d 100644 --- a/dot_config/zsh/apex-neon.zsh +++ b/dot_config/zsh/apex-neon.zsh @@ -190,10 +190,12 @@ apex_git_update() { # Upstream (earned ✓) if command git rev-parse --abbrev-ref --symbolic-full-name @{u} &>/dev/null; then - local counts + local counts behind ahead counts="$(command git rev-list --left-right --count @{u}...HEAD 2>/dev/null)" || return - apex_git_behind="${counts%% *}" - apex_git_ahead="${counts##* }" + local IFS=$' \t' + read -r behind ahead <<<"$counts" + apex_git_behind="${behind:-0}" + apex_git_ahead="${ahead:-0}" if (( apex_git_dirty_wt == 0 && apex_git_dirty_ix == 0 )) && [[ -z "$apex_git_op" ]]; then [[ "$apex_git_behind" == "0" && "$apex_git_ahead" == "0" ]] && apex_git_up_ok=1