Cleaned/improved description of CLI options

This commit is contained in:
Rémy Coutable 2011-06-19 12:22:32 +02:00
parent 5996951685
commit 709f63754e

View File

@ -15,13 +15,13 @@ module Guard
::Guard.start(options) ::Guard.start(options)
end end
desc "version", "Prints Guard's version information" desc "version", "Prints Guard's version"
def version def version
::Guard::UI.info "Guard version #{Guard::VERSION}" ::Guard::UI.info "Guard version #{Guard::VERSION}"
end end
map %w(-v --version) => :version map %w(-v --version) => :version
desc "init [GUARD]", "Generates a Guardfile into the current working directory, or insert the given GUARD" desc "init [GUARD]", "Generates a Guardfile into the current working directory, or insert the given GUARD in an existing Guardfile"
def init(guard_name = nil) def init(guard_name = nil)
if !File.exist?("Guardfile") if !File.exist?("Guardfile")
puts "Writing new Guardfile to #{Dir.pwd}/Guardfile" puts "Writing new Guardfile to #{Dir.pwd}/Guardfile"