diff --git a/CHANGELOG.md b/CHANGELOG.md index 8800d89a7..7be5de0e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/lib/vagrant/command/group_base.rb b/lib/vagrant/command/group_base.rb index d3a940d68..95ef6ef78 100644 --- a/lib/vagrant/command/group_base.rb +++ b/lib/vagrant/command/group_base.rb @@ -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