Oh My Zsh update check: controlling blocking behavior and timeouts at shell startup
0 reputation · 18 Jan 2023, 18:09 UTC
Oh My Zsh update mode and startup blocking
I want to keep Oh My Zsh's built-in update mechanism enabled, but I need the startup check to never block my interactive prompt for more than a moment, and to fail quietly when the network is slow or unavailable (e.g. on a laptop that frequently joins captive-portal or offline networks).
From the documentation I understand the behavior is configured with zstyle ':omz:update' mode (auto, reminder, disabled) and zstyle ':omz:update' frequency <days>, throttled via the .zsh-update timestamp in the cache directory. What is not clear to me is what happens when the underlying git fetch hangs: whether there is any built-in timeout or cancellation path, or whether the check can be interrupted without leaving the install directory in a half-updated state.
My constraints: I cannot rely on a stable proxy configuration, and I want prompt availability to be effectively instant on every new shell.
Specifically:
- In
autoorremindermode, is the update check synchronous at startup, and is there any documented timeout or way to cancel a hung git operation safely? - Is
remindermode guaranteed to be non-blocking compared toauto, or does it still perform the network fetch before printing the prompt? - For latency-sensitive setups, is the recommended pattern to disable the startup check and run
omz updatemanually on a schedule instead?