diff --git a/default/.config/zsh/.zshrc b/default/.config/zsh/.zshrc index 4eef0d5..7c6dda5 100644 --- a/default/.config/zsh/.zshrc +++ b/default/.config/zsh/.zshrc @@ -12,4 +12,6 @@ source ${ZDOTDIR}/init.zsh source ${ZDOTDIR}/aliases.zsh source ${ZDOTDIR}/functions.zsh -eval "$(starship init zsh)" \ No newline at end of file +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 323314a..b9669a0 100644 --- a/default/.config/zsh/functions.zsh +++ b/default/.config/zsh/functions.zsh @@ -19,10 +19,7 @@ dotstate_update() { local remote_sha local_sha remote_sha=$(git ls-remote "$REPO_URL" HEAD | awk '{print $1}') local_sha=$(git -C "$TARGET_DIR" rev-parse HEAD) - if [[ "$remote_sha" == "$local_sha" ]]; then - info "Repository up to date" - return 0 - fi + [[ "$remote_sha" == "$local_sha" ]] && return 0 info "Repository out of date. Pulling updates..." git -C "$TARGET_DIR" pull &>/dev/null else