vagrant help <foo> works [GH-1578]
This commit is contained in:
parent
bd378ea2b0
commit
80666c03d6
|
@ -1,5 +1,9 @@
|
||||||
## 1.2.5 (unreleased)
|
## 1.2.5 (unreleased)
|
||||||
|
|
||||||
|
FEATURES:
|
||||||
|
|
||||||
|
- `vagrant help <command>` now works. [GH-1578]
|
||||||
|
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
|
||||||
- Remote commands that fail will now show the stdout/stderr of the
|
- Remote commands that fail will now show the stdout/stderr of the
|
||||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue