From 1aa2b18e293db8278a013322e42fd7aaa002a780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 4 Dec 2020 12:34:01 +0100 Subject: [PATCH] feat(CLI): add `--unattended` flag to `omz update` to not reload zsh (#9187) --- lib/cli.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli.zsh b/lib/cli.zsh index 253c554c1..38cdc449c 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -384,7 +384,7 @@ function _omz::update { # Remove update lock if it exists command rm -rf "$ZSH/log/update.lock" # Restart the zsh session - if [[ $ret -eq 0 ]]; then + if [[ $ret -eq 0 && "$1" != --unattended ]]; then # Check whether to run a login shell [[ "$ZSH_ARGZERO" = -* ]] && exec -l "${ZSH_ARGZERO#-}" || exec "$ZSH_ARGZERO" fi