Get rid of extra subcommand help message
The available subcommands are displayed using the option parser in the vagrant client
This commit is contained in:
parent
b2cf6ed9bf
commit
434cc89a95
@ -40,16 +40,18 @@ module VagrantPlugins
|
|||||||
def help
|
def help
|
||||||
opts = OptionParser.new do |opts|
|
opts = OptionParser.new do |opts|
|
||||||
opts.banner = "Usage: vagrant autocomplete <subcommand>"
|
opts.banner = "Usage: vagrant autocomplete <subcommand>"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
|
|
||||||
# Add the available subcommands as separators in order to print them
|
# Add the available subcommands as separators in order to print them
|
||||||
# out as well.
|
# out as well.
|
||||||
keys = []
|
keys = []
|
||||||
keys = @subcommands.keys.map(&:to_s)
|
keys = @subcommands.keys.map(&:to_s)
|
||||||
|
|
||||||
keys.sort.each do |key|
|
keys.sort.each do |key|
|
||||||
opts.separator " #{key}"
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
|
|||||||
@ -70,18 +70,19 @@ module VagrantPlugins
|
|||||||
def help
|
def help
|
||||||
opts = OptionParser.new do |opts|
|
opts = OptionParser.new do |opts|
|
||||||
opts.banner = "Usage: vagrant box <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant box <subcommand> [<args>]"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
|
|
||||||
# Add the available subcommands as separators in order to print them
|
# Add the available subcommands as separators in order to print them
|
||||||
# out as well.
|
# out as well.
|
||||||
keys = []
|
keys = []
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
|
|
||||||
keys.sort.each do |key|
|
keys.sort.each do |key|
|
||||||
opts.separator " #{key}"
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant box <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant box <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -48,18 +48,19 @@ module VagrantPlugins
|
|||||||
opts.banner = "Usage: vagrant cloud auth <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant cloud auth <subcommand> [<args>]"
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "Authorization with Vagrant Cloud"
|
opts.separator "Authorization with Vagrant Cloud"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant cloud auth <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant cloud auth <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -52,18 +52,19 @@ module VagrantPlugins
|
|||||||
opts.banner = "Usage: vagrant cloud box <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant cloud box <subcommand> [<args>]"
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "Commands to manage boxes on Vagrant Cloud"
|
opts.separator "Commands to manage boxes on Vagrant Cloud"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant cloud box <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant cloud box <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -52,18 +52,19 @@ module VagrantPlugins
|
|||||||
opts.banner = "Usage: vagrant cloud provider <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant cloud provider <subcommand> [<args>]"
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For various provider actions with Vagrant Cloud"
|
opts.separator "For various provider actions with Vagrant Cloud"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant cloud provider <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant cloud provider <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -80,18 +80,19 @@ module VagrantPlugins
|
|||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "The cloud command can be used for taking actions against"
|
opts.separator "The cloud command can be used for taking actions against"
|
||||||
opts.separator "Vagrant Cloud like searching or uploading a Vagrant Box"
|
opts.separator "Vagrant Cloud like searching or uploading a Vagrant Box"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key.ljust(15)} #{@subcommand_helptext[key.to_sym]}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key.ljust(15)} #{@subcommand_helptext[key.to_sym]}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant cloud <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant cloud <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -56,18 +56,19 @@ module VagrantPlugins
|
|||||||
opts.banner = "Usage: vagrant cloud version <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant cloud version <subcommand> [<args>]"
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For taking various actions against a Vagrant box's version attribute on Vagrant Cloud"
|
opts.separator "For taking various actions against a Vagrant box's version attribute on Vagrant Cloud"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant cloud version <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant cloud version <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -70,18 +70,19 @@ module VagrantPlugins
|
|||||||
def help
|
def help
|
||||||
opts = OptionParser.new do |o|
|
opts = OptionParser.new do |o|
|
||||||
o.banner = "Usage: vagrant plugin <command> [<args>]"
|
o.banner = "Usage: vagrant plugin <command> [<args>]"
|
||||||
o.separator ""
|
if !Vagrant.server_mode?
|
||||||
o.separator "Available subcommands:"
|
o.separator ""
|
||||||
|
o.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
o.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
o.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
o.separator ""
|
o.separator ""
|
||||||
o.separator "For help on any individual command run `vagrant plugin COMMAND -h`"
|
o.separator "For help on any individual command run `vagrant plugin COMMAND -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -69,18 +69,19 @@ module VagrantPlugins
|
|||||||
def help
|
def help
|
||||||
opts = OptionParser.new do |opts|
|
opts = OptionParser.new do |opts|
|
||||||
opts.banner = "Usage: vagrant snapshot <subcommand> [<args>]"
|
opts.banner = "Usage: vagrant snapshot <subcommand> [<args>]"
|
||||||
opts.separator ""
|
if !Vagrant.server_mode?
|
||||||
opts.separator "Available subcommands:"
|
opts.separator ""
|
||||||
|
opts.separator "Available subcommands:"
|
||||||
# Add the available subcommands as separators in order to print them
|
|
||||||
# out as well.
|
# Add the available subcommands as separators in order to print them
|
||||||
keys = []
|
# out as well.
|
||||||
@subcommands.each { |key, value| keys << key.to_s }
|
keys = []
|
||||||
|
@subcommands.each { |key, value| keys << key.to_s }
|
||||||
keys.sort.each do |key|
|
|
||||||
opts.separator " #{key}"
|
keys.sort.each do |key|
|
||||||
|
opts.separator " #{key}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.separator ""
|
opts.separator ""
|
||||||
opts.separator "For help on any individual subcommand run `vagrant snapshot <subcommand> -h`"
|
opts.separator "For help on any individual subcommand run `vagrant snapshot <subcommand> -h`"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user