diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 3027535724..aa94ad2da0 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -14,6 +14,7 @@ module Bundler COMMAND_ALIASES = { "check" => "c", "install" => "i", + "plugin" => "", "list" => "ls", "exec" => ["e", "ex", "exe"], "cache" => ["package", "pack"], diff --git a/spec/bundler/plugins/install_spec.rb b/spec/bundler/plugins/install_spec.rb index 2175610b10..ef39e75a58 100644 --- a/spec/bundler/plugins/install_spec.rb +++ b/spec/bundler/plugins/install_spec.rb @@ -29,6 +29,12 @@ RSpec.describe "bundler plugin install" do plugin_should_be_installed("foo") end + it "shows help when --help flag is given" do + bundle "plugin install --help" + + expect(out).to include("bundle plugin install PLUGINS # Install the plugin from the source") + end + context "plugin is already installed" do before do bundle "plugin install foo --source #{file_uri_for(gem_repo2)}"