Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add command before instances of git that didn't have it #643

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions zinit-autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 $?
} # ]]]

Expand Down
Loading