diff --git a/setup/modules/shell-setup.sh b/setup/modules/shell-setup.sh index f1fcf2b..37c3579 100755 --- a/setup/modules/shell-setup.sh +++ b/setup/modules/shell-setup.sh @@ -219,11 +219,17 @@ fi # WHY: oh-my-zsh provides the plugin framework, completion system, and themes # that our .zshrc configuration depends on. It installs to ~/.oh-my-zsh/. # HOW: Download and run the official install script. -# RUNZSH=no: don't switch to zsh and start a new shell during install -# CHSH=no: don't automatically change the default shell (we do that explicitly below) +# --unattended: skip ALL interactive prompts — crucially the "overwrite .zshrc?" +# question, which otherwise hangs an automated install. It also +# implies RUNZSH=no and CHSH=no. +# KEEP_ZSHRC=yes: do NOT replace ~/.zshrc with the oh-my-zsh template. We already +# symlinked ~/.zshrc to the dotfiles copy above; without this the +# installer would clobber that symlink with its own template. +# RUNZSH=no / CHSH=no kept explicit for clarity (we change the shell ourselves below). if [ ! -d "$HOME/.oh-my-zsh" ]; then log "Installing oh-my-zsh..." - RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + KEEP_ZSHRC=yes RUNZSH=no CHSH=no \ + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended else skip "oh-my-zsh already installed." fi