Update 2 files: .zshrc, functions.zsh

This commit is contained in:
2026-08-01 15:31:26 -04:00
parent bd46eecf8f
commit d0d398701f
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ source ${ZDOTDIR}/init.zsh
source ${ZDOTDIR}/aliases.zsh source ${ZDOTDIR}/aliases.zsh
source ${ZDOTDIR}/functions.zsh source ${ZDOTDIR}/functions.zsh
dotstate_update
eval "$(starship init zsh)" eval "$(starship init zsh)"
dotstate_update
+2 -1
View File
@@ -17,7 +17,8 @@ dotstate_update() {
if [[ -d "$TARGET_DIR/.git" ]]; then if [[ -d "$TARGET_DIR/.git" ]]; then
local remote_sha local_sha local remote_sha local_sha
remote_sha=$(git ls-remote "$REPO_URL" HEAD | awk '{print $1}') remote_sha=$(timeout 5 git ls-remote "$REPO_URL" HEAD | awk '{print $1}')
[[ -z "$remote_sha" ]] && return 0
local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD) local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD)
[[ "$remote_sha" == "$local_sha" ]] && return 0 [[ "$remote_sha" == "$local_sha" ]] && return 0
info "Repository out of date. Pulling updates..." info "Repository out of date. Pulling updates..."