zsh: print a user-facing banner when the bootstrap fires
The bootstrap silently installs tools for ~30s+ on a version bump or first login, which looked like an unexplained hang. Now prints a banner explaining what is happening, that it may take a minute, and that subsequent runs are a no-op. The box is built dynamically so the right edge stays aligned regardless of the version string length. Also clarifies the trigger comment in zshrc.
This commit is contained in:
@@ -32,7 +32,10 @@ install_opencode(){
|
||||
curl -fsSL https://opencode.ai/install | bash
|
||||
}
|
||||
|
||||
# Bootstrap: download and run once per bootstrap version
|
||||
# Bootstrap: download and run once per bootstrap version. Installs missing CLI
|
||||
# tools and oh-my-zsh/plugins across distros; prints a banner so the user knows
|
||||
# what the activity is. Re-runs only when ZSHRC_BOOTSTRAP_VERSION is bumped or
|
||||
# BOOTSTRAP=true is set.
|
||||
if [[ ! -f "$ZSHRC_BOOTSTRAP" || "$(cat "$ZSHRC_BOOTSTRAP" 2>/dev/null)" != "$ZSHRC_BOOTSTRAP_VERSION" || "$BOOTSTRAP" == "true" ]]; then
|
||||
tmp=/tmp/.zshrc_bootstrap.$$
|
||||
curl -fsSL --connect-timeout 5 --max-time 10 -o "$tmp" "$ZSHRC_BOOTSTRAP_URL" 2>/dev/null
|
||||
|
||||
Reference in New Issue
Block a user