From 7094330387b1e4afff6185083135871d764467c0 Mon Sep 17 00:00:00 2001 From: Kilian Tyler Date: Tue, 19 Mar 2024 18:55:18 -0400 Subject: [PATCH] fix: add `command` before instances of `git` that didn't have it (#643) Co-authored-by: vladislav doster <10052309+vladdoster@users.noreply.github.com> --- zinit-autoload.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zinit-autoload.zsh b/zinit-autoload.zsh index 9d7a8205f..7dde7dd6d 100644 --- a/zinit-autoload.zsh +++ b/zinit-autoload.zsh @@ -1969,7 +1969,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}" [[ $1 = -q ]] && +zi-log "{pre}[self-update]{info} updating zinit repository{msg2}" \ local nl=$'\n' escape=$'\x1b[' - local current_branch=$(git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD) + local current_branch=$(command git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD) # local current_branch='main' local -a lines ( @@ -3168,7 +3168,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}" } } - if [[ -d $local_dir/.git ]] && ( builtin cd -q $local_dir ; git show-ref --verify --quiet refs/heads/main ); then + if [[ -d $local_dir/.git ]] && ( builtin cd -q $local_dir ; command git show-ref --verify --quiet refs/heads/main ); then local main_branch=main else local main_branch=master @@ -3574,7 +3574,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}" # # User-action entry point. zi::version() { - +zi-log "zinit{cmd} $(git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})" + +zi-log "zinit{cmd} $(command git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})" return $? } # ]]]