-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Description
As in https://github.com/matryer/xbar-plugins/blob/main/Dev/Homebrew/brew-updates.1h.rb#L306
if writing in ruby like:
if all_casks.size.positive?
cmds << '&&' if cmds.size.positive?
cmds += [brew_path, 'upgrade', '--cask'] +
all_casks.map(&:name)
end
printer.item(
"⬆️ Upgrade All (#{all_formulas.size + all_casks.size})",
terminal: true, refresh: true,
bash: (cmds + post_commands).flatten
)
then the shell will run like this:
/opt/homebrew/bin/brew upgrade --formula c-ares cmake coreutils d2 fd
gawk gcc git-lfs go gperftools lf libpthread-stubs libssh lua mpfr node openssl
@1.1 python@3.11 qemu smartmontools texinfo tree typst wimlib yarn '&&' /opt/homebrew/bin/brew upgrade --cask ipatool
however zsh can not accept '&&' as && or ';' as ; and raise an error.