From fb8dc68cfd1a15916907e841a451791cc1891b67 Mon Sep 17 00:00:00 2001 From: murgi Date: Tue, 5 Aug 2025 14:34:08 +0200 Subject: [PATCH] [ZSH] Fix autopull --- zsh/.zshrc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 220ad0f..866344d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -6,16 +6,14 @@ [[ -f ~/.zsh/.virtual_env_config.zsh ]] && source ~/.zsh/.virtual_env_config.zsh [[ -f ~/.zsh/.local_config ]] && source ~/.zsh/.local_config -function update_dotfiles () { -cd ~/dotfiles -sleep 120 -fetch=$(git fetch) -if [[ -n "$fetch" ]]; then - git pull || echo "git pull of dotfiles failed, please see log." -fi +update_dotfiles() { + cd ~/dotfiles || return + if git fetch --dry-run 2>&1 | grep -q .; then + git pull > /dev/null 2>&1 + fi } -update_dotfiles &| +update_dotfiles 2>&1 &! # Load Antidote mkdir -p ${ZDOTDIR:-~}/.cache/zsh