Print out the new style help with -h and --help instead of the old-style help.

This commit is contained in:
Chris Eppstein 2010-08-31 21:48:25 -07:00
parent de66f7ad6a
commit 01cbc9cc6c
2 changed files with 9 additions and 2 deletions

View File

@ -5,9 +5,11 @@ module Compass::Exec
if Compass::Commands.command_exists? arguments.first if Compass::Commands.command_exists? arguments.first
SubCommandUI SubCommandUI
else else
unless arguments.include?("-h") || arguments.include?("--help")
Compass::Logger.new.red do Compass::Logger.new.red do
Haml::Util.haml_warn "WARNING: This interface is deprecated. Please use the new subcommand interface.\nSee `compass help` for more information.\n" Haml::Util.haml_warn "WARNING: This interface is deprecated. Please use the new subcommand interface.\nSee `compass help` for more information.\n"
end end
end
SwitchUI SwitchUI
end end
end end

View File

@ -89,6 +89,11 @@ END
self.options[:pattern] = pattern self.options[:pattern] = pattern
end end
opts.on('-h', '--help') do
self.options[:command] = :help
self.options[:help_command] = :help
end
opts.on('--write-configuration', "Write the current configuration to the configuration file.") do opts.on('--write-configuration', "Write the current configuration to the configuration file.") do
self.options[:command] = :write_configuration self.options[:command] = :write_configuration
end end