From d0d398701fdc879f4e00f43988d835b401faa3fc Mon Sep 17 00:00:00 2001 From: Jeremy McClure Date: Sat, 1 Aug 2026 15:31:26 -0400 Subject: [PATCH] Update 2 files: .zshrc, functions.zsh --- default/.config/zsh/.zshrc | 3 ++- default/.config/zsh/functions.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/default/.config/zsh/.zshrc b/default/.config/zsh/.zshrc index 7c6dda5..3646172 100644 --- a/default/.config/zsh/.zshrc +++ b/default/.config/zsh/.zshrc @@ -12,6 +12,7 @@ source ${ZDOTDIR}/init.zsh source ${ZDOTDIR}/aliases.zsh source ${ZDOTDIR}/functions.zsh +dotstate_update + eval "$(starship init zsh)" -dotstate_update \ No newline at end of file diff --git a/default/.config/zsh/functions.zsh b/default/.config/zsh/functions.zsh index b9669a0..ae187af 100644 --- a/default/.config/zsh/functions.zsh +++ b/default/.config/zsh/functions.zsh @@ -17,7 +17,8 @@ dotstate_update() { if [[ -d "$TARGET_DIR/.git" ]]; then 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) [[ "$remote_sha" == "$local_sha" ]] && return 0 info "Repository out of date. Pulling updates..."