diff --git a/CHANGELOG.md b/CHANGELOG.md index 594e3e8b8..3e4e566b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## 1.2.5 (unreleased) +FEATURES: + + - `vagrant help ` now works. [GH-1578] + IMPROVEMENTS: - Remote commands that fail will now show the stdout/stderr of the diff --git a/plugins/commands/help/command.rb b/plugins/commands/help/command.rb new file mode 100644 index 000000000..08a847177 --- /dev/null +++ b/plugins/commands/help/command.rb @@ -0,0 +1,12 @@ +require 'optparse' + +module VagrantPlugins + module CommandHelp + class Command < Vagrant.plugin("2", :command) + def execute + return @env.cli([]) if @argv.empty? + @env.cli([@argv[0], "-h"]) + end + end + end +end diff --git a/plugins/commands/help/plugin.rb b/plugins/commands/help/plugin.rb new file mode 100644 index 000000000..4634a473a --- /dev/null +++ b/plugins/commands/help/plugin.rb @@ -0,0 +1,17 @@ +require "vagrant" + +module VagrantPlugins + module CommandHelp + class Plugin < Vagrant.plugin("2") + name "help command" + description <<-DESC + The `help` command shows help for the given command. + DESC + + command("help") do + require File.expand_path("../command", __FILE__) + Command + end + end + end +end