vagrant help <foo> works [GH-1578]

This commit is contained in:
Mitchell Hashimoto 2013-07-18 12:11:36 -04:00
parent bd378ea2b0
commit 80666c03d6
3 changed files with 33 additions and 0 deletions

View File

@ -1,5 +1,9 @@
## 1.2.5 (unreleased)
FEATURES:
- `vagrant help <command>` now works. [GH-1578]
IMPROVEMENTS:
- Remote commands that fail will now show the stdout/stderr of the

View File

@ -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

View File

@ -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