Subcommand help shows proper full command in task listing. [closes GH-168]

This commit is contained in:
Mitchell Hashimoto 2010-09-30 00:07:01 -07:00
parent c5b81b5998
commit c0e3047af7
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
## 0.6.4 (unreleased)
- Subcommand help shows proper full command in task listing. [GH-168]
- SSH gives error message if `ssh` binary is not found. [GH-161]
- SSH gives proper error message if VM is not running. [GH-167]
- Fix some issues with undefined constants in command errors.

View File

@ -87,13 +87,21 @@ module Vagrant
# @param [String] description
# @param [Hash] opts
def self.register(usage, description, opts=nil)
CLI.register(self, Base.extract_name_from_usage(usage), usage, description, opts)
@_name = Base.extract_name_from_usage(usage)
CLI.register(self, @_name, usage, description, opts)
end
def initialize(*args)
super
initialize_environment(*args)
end
protected
# Override the basename to include the subcommand name.
def self.basename
"#{super} #{@_name}"
end
end
end
end