Rename usage path to command to just the command name

上级 ea591771
if ARGV.empty? if ARGV.empty?
puts "Usage: ./script/performance/benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..." puts "Usage: benchmarker [times] 'Person.expensive_way' 'Person.another_expensive_way' ..."
exit 1 exit 1
end end
......
if ARGV.empty? if ARGV.empty?
$stderr.puts "Usage: ./script/performance/profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]" $stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times] [flat|graph|graph_html]"
exit(1) exit(1)
end end
......
...@@ -295,7 +295,7 @@ def environment=(value) ...@@ -295,7 +295,7 @@ def environment=(value)
def options def options
OptionParser.new do |o| OptionParser.new do |o|
o.set_summary_indent(' ') o.set_summary_indent(' ')
o.banner = "Usage: #{@script_name} [OPTIONS] command" o.banner = "Usage: plugin [OPTIONS] command"
o.define_head "Rails plugin manager." o.define_head "Rails plugin manager."
o.separator "" o.separator ""
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
ARGV.clone.options do |opts| ARGV.clone.options do |opts|
script_name = File.basename($0) script_name = File.basename($0)
opts.banner = "Usage: #{$0} [options] ('Some.ruby(code)' or a filename)" opts.banner = "Usage: runner [options] ('Some.ruby(code)' or a filename)"
opts.separator "" opts.separator ""
......
...@@ -175,8 +175,7 @@ def self.help ...@@ -175,8 +175,7 @@ def self.help
groups[base] << namespace groups[base] << namespace
end end
puts "Usage:" puts "Usage: generate GENERATOR [args] [options]"
puts " script/generate GENERATOR [args] [options]"
puts puts
puts "General options:" puts "General options:"
puts " -h, [--help] # Print generators options and usage" puts " -h, [--help] # Print generators options and usage"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册