Skip to content

Commit

Permalink
cmd/bundle: add brew bundle edit command.
Browse files Browse the repository at this point in the history
This is shorthand for `brew edit <Brewfile path>`.
  • Loading branch information
MikeMcQuaid committed Jan 23, 2025
1 parent 64b37e1 commit d836450
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class BundleCmd < AbstractCommand
By default, only Homebrew formula dependencies are listed.
`brew bundle edit`:
Edit the `Brewfile` in your editor.
`brew bundle exec` <command>:
Run an external command in an isolated build environment based on the `Brewfile` dependencies.
Expand Down Expand Up @@ -110,7 +113,7 @@ class BundleCmd < AbstractCommand
conflicts "--all", "--no-vscode"
conflicts "--vscode", "--no-vscode"

named_args %w[install dump cleanup check exec list]
named_args %w[install dump cleanup check exec list edit]
end

sig { override.void }
Expand Down Expand Up @@ -174,6 +177,8 @@ def run
whalebrew: args.whalebrew? || no_type_args,
vscode:
)
when "edit"
exec_editor(Bundle::Brewfile.path(global:, file:))
when "cleanup"
Bundle::Commands::Cleanup.run(global:, file:, force:, zap:)
when "check"
Expand Down

0 comments on commit d836450

Please sign in to comment.