From b071ac44193b1f8f92f4a40c11ddbbb8b37e0b7d Mon Sep 17 00:00:00 2001 From: Rahul Agarwal Date: Sun, 19 Jul 2026 05:00:55 +0530 Subject: [PATCH] fix(bundler): make `bu` pass arguments through Preserve `bundle update --all` for the no-argument form while allowing specific gems and options to pass through. Fixes #13871 Assisted-by: Claude Fable 5 (Claude Code) --- plugins/bundler/README.md | 2 +- plugins/bundler/bundler.plugin.zsh | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md index 8280a344c..736e74d04 100644 --- a/plugins/bundler/README.md +++ b/plugins/bundler/README.md @@ -22,7 +22,7 @@ plugins=(... bundler) | `bo` | `bundle open` | Opens the source directory for a gem in your bundle | | `bout` | `bundle outdated` | List installed gems with newer versions available | | `bp` | `bundle package` | Package your needed .gem files into your application | -| `bu` | `bundle update --all` | Update your gems to the latest available versions | +| `bu` | `bundle update --all` (no arguments) or `bundle update ` | Update all gems, or only the given gems/options (e.g. `bu rake`, `bu --ruby`) | ## Gem wrapper diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index a496d42de..6076be2a9 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -9,7 +9,16 @@ alias bl="bundle list" alias bo="bundle open" alias bout="bundle outdated" alias bp="bundle package" -alias bu="bundle update --all" +unalias bu 2>/dev/null +# `bundle update` needs --all to update everything, but rejects --all when +# gems or options are given (e.g. `bu `, `bu --ruby`) +bu() { + if [[ $# -eq 0 ]]; then + bundle update --all + else + bundle update "$@" + fi +} ## Gem wrapper