Custom help for `vagrant gem` on top of RubyGems help

This commit is contained in:
Mitchell Hashimoto 2012-02-06 22:52:34 -05:00
parent 2fdc2f314c
commit a3d9615a13
2 changed files with 15 additions and 0 deletions

View File

@ -15,6 +15,14 @@ module Vagrant
end
end
# If the user needs some help, we add our own little message at the
# top so that they're aware of what `vagrant gem` is doing, really.
if @argv.empty? || @argv.include?("-h") || @argv.include?("--help")
@env.ui.info(I18n.t("vagrant.commands.gem.help_preamble"),
:prefix => false)
puts
end
# We just proxy the arguments onto a real RubyGems command
# but change `GEM_HOME` so that the gems are installed into
# our own private gem folder.

View File

@ -231,6 +231,13 @@ en:
vm_not_running: "VM is not currently running. Please bring it up to run this command."
box:
no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some."
gem:
help_preamble: |-
`vagrant gem` is used to install Vagrant plugins via the RubyGems
system. In fact, `vagrant gem` is just a frontend to the actual `gem`
interface, with the difference being that Vagrant sets up a custom
directory where gems are installed so that they are isolated from your
system gems.
init:
success: |-
A `Vagrantfile` has been placed in this directory. You are now