diff --git a/CHANGELOG.md b/CHANGELOG.md index e8f44093e..96454eba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ IMPROVEMENTS: needs to any type. [GH-2709] - commands/plugin: `vagrant plugin update` will now update all installed plugins, respecting any constraints set. + - commands/plugin: `vagrant plugin uninstall` can now uninstall multiple + plugins. BUG FIXES: diff --git a/plugins/commands/plugin/command/uninstall.rb b/plugins/commands/plugin/command/uninstall.rb index 1dfead4b2..a61fb182e 100644 --- a/plugins/commands/plugin/command/uninstall.rb +++ b/plugins/commands/plugin/command/uninstall.rb @@ -8,7 +8,7 @@ module VagrantPlugins class Uninstall < Base def execute opts = OptionParser.new do |o| - o.banner = "Usage: vagrant plugin uninstall [-h]" + o.banner = "Usage: vagrant plugin uninstall [ ...] [-h]" end # Parse the options @@ -17,7 +17,9 @@ module VagrantPlugins raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1 # Uninstall the gems - argv.each{ |gem| action(Action.action_uninstall, :plugin_name => gem) } + argv.each do |gem| + action(Action.action_uninstall, :plugin_name => gem) + end # Success, exit status 0 0 diff --git a/website/docs/source/v2/cli/plugin.html.md b/website/docs/source/v2/cli/plugin.html.md index ee5651a5c..35504bad8 100644 --- a/website/docs/source/v2/cli/plugin.html.md +++ b/website/docs/source/v2/cli/plugin.html.md @@ -65,11 +65,13 @@ be shown, too. # Plugin Uninstall -**Command: `vagrant plugin uninstall `** +**Command: `vagrant plugin uninstall [ ...]`** This uninstalls the plugin with the given name. Any dependencies of the plugin will also be uninstalled assuming no other plugin needs them. +If multiple plugins are given, multiple plugins will be uninstalled. + # Plugin Update **Command: `vagrant plugin update []`**