summaryrefslogtreecommitdiff
path: root/lib/cli.zsh
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2023-11-04 18:38:46 -0700
committerTuowen Zhao <ztuowen@gmail.com>2023-11-04 18:38:46 -0700
commit4d908094fdc2a0c0e9a0a072eba213fab7adef43 (patch)
tree7c17e70bcdeebbe96c84d849bdf17882007480d8 /lib/cli.zsh
parent4b0bbc0b263a150eb9a9b59f196914629be06a9b (diff)
parent632ed413a9ce62747ded83d7736491b081be4b49 (diff)
downloadzsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.gz
zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.tar.bz2
zsh-4d908094fdc2a0c0e9a0a072eba213fab7adef43.zip
Merge remote-tracking branch 'github/master'HEADmaster
Diffstat (limited to 'lib/cli.zsh')
-rw-r--r--lib/cli.zsh7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/cli.zsh b/lib/cli.zsh
index fed00d21d..561c1b98b 100644
--- a/lib/cli.zsh
+++ b/lib/cli.zsh
@@ -11,7 +11,7 @@ function omz {
# Subcommand functions start with _ so that they don't
# appear as completion entries when looking for `omz`
- (( $+functions[_omz::$command] )) || {
+ (( ${+functions[_omz::$command]} )) || {
_omz::help
return 1
}
@@ -776,10 +776,11 @@ function _omz::update {
local last_commit=$(builtin cd -q "$ZSH"; git rev-parse HEAD)
# Run update script
+ zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default
if [[ "$1" != --unattended ]]; then
- ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $?
+ ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode || return $?
else
- ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" || return $?
+ ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" -v $verbose_mode || return $?
fi
# Update last updated file