diff --git a/AGENTS.md b/AGENTS.md index dddc57e..861d38d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,5 +33,5 @@ Practical rule: **edit the `.example` source, not the generated symlink target.* ## Maintenance -- `./update_mac.sh` — macOS update runner. Default (no args) runs `--brew-update --cleanup --diagnostics --update-others`; other flags: `--system-update`, `--permission-fix` (strips Caskroom/App quarantine xattrs). Run `./update_mac.sh --help` for the list. `--update-others` also updates Alacritty from its verified upstream release and antidote plugins (not updated at shell start), then runs `claude --update` and `Codex --update`. +- `./update_mac.sh` — macOS update runner. Default (no args) runs `--brew-update --cleanup --diagnostics --update-others`; other flags: `--system-update`, `--permission-fix` (strips Caskroom/App quarantine xattrs). Run `./update_mac.sh --help` for the list. `--update-others` also updates Alacritty from its verified upstream release and antidote plugins (not updated at shell start), tmux plugins (TPM) and nvim plugins (vim-plug, headless), cleaning plugins no longer in the config, then runs `claude --update`, `codex update`, and `pi update` (incl. extensions) when installed. - `brew_autoupdate` — runs scheduled brew and Alacritty auto-updates. diff --git a/update_mac.sh b/update_mac.sh index 287e2cd..c46d218 100755 --- a/update_mac.sh +++ b/update_mac.sh @@ -63,14 +63,6 @@ function update_others { echo "Update other stuff" echo "----------" - echo "-- ALACRITTY" - "$SCRIPT_DIR/install_alacritty_mac.sh" || echo "Alacritty update failed." >&2 - - if [ -f "$HOME/.antidote/antidote.zsh" ]; then - echo "-- ANTIDOTE" - zsh "$HOME/.antidote/antidote.zsh" update - fi - if [ -x "$(command -v claude)" ]; then echo "-- CLAUDE" claude --update @@ -86,6 +78,28 @@ function update_others { pi update pi update --extensions fi + + echo "-- ALACRITTY" + "$SCRIPT_DIR/install_alacritty_mac.sh" || echo "Alacritty update failed." >&2 + + if [ -f "$HOME/.antidote/antidote.zsh" ]; then + echo "-- ANTIDOTE" + zsh "$HOME/.antidote/antidote.zsh" update + fi + + if [ -x "$HOME/.tmux/plugins/tpm/bin/update_plugins" ]; then + echo "-- TMUX PLUGINS" + "$HOME/.tmux/plugins/tpm/bin/clean_plugins" + "$HOME/.tmux/plugins/tpm/bin/update_plugins" all + fi + + if [ -x "$(command -v nvim)" ]; then + echo "-- NVIM PLUGINS" + # Headless vim-plug only logs to its buffer; print it + nvim --headless -c 'PlugClean!' -c 'PlugUpgrade' -c 'PlugUpdate --sync' \ + -c 'lua io.write("\n", table.concat(vim.api.nvim_buf_get_lines(0, 0, -1, false), "\n"), "\n")' \ + -c 'qa' + fi } if [[ $* == *--help* ]]; then