From b106d4112c0ad2cfe68c6cbeac0494db4ffe3efd Mon Sep 17 00:00:00 2001 From: Diego Villarreal Date: Wed, 1 Apr 2026 11:14:26 -0600 Subject: [PATCH] feat(installer): add specific flag to skip Zsh execution after installation This flag would skip executing a Zsh subshell without forcingly use --unattended, allowing the user to still choose to change the default shell and overwrite the current .zshrc file at users's $HOME. This flag is compatible with other established ways to skip running a Zsh subshell, like `RUNZSH=yes sh -c "$()`, or `--unattended`, as noted in PR #5853 (https://github.com/ohmyzsh/ohmyzsh/pull/5853#issuecomment-496625733) --- tools/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index d907b795c..910e7420c 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,6 +32,7 @@ # # You can also pass some arguments to the install script to set some these options: # --skip-chsh: has the same behavior as setting CHSH to 'no' +# --skip-runzsh: has the same behavior as setting RUNZSH to 'no' # --unattended: sets both CHSH and RUNZSH to 'no' # --keep-zshrc: sets KEEP_ZSHRC to 'yes' # For example: @@ -343,7 +344,7 @@ setup_zshrc() { echo "${FMT_YELLOW}Found ${zdot}/.zshrc.${FMT_RESET} ${FMT_GREEN}Keeping...${FMT_RESET}" return fi - + if [ $OVERWRITE_CONFIRMATION != "no" ]; then # Ask user for confirmation before backing up and overwriting echo "${FMT_YELLOW}Found ${zdot}/.zshrc." @@ -522,6 +523,7 @@ main() { while [ $# -gt 0 ]; do case $1 in --unattended) RUNZSH=no; CHSH=no; OVERWRITE_CONFIRMATION=no ;; + --skip-runzsh) RUNZSH=no ;; --skip-chsh) CHSH=no ;; --keep-zshrc) KEEP_ZSHRC=yes ;; esac