Permalink
Browse files

Updated command line argument handling as well as the command line doc.

  • Loading branch information...
1 parent 8049c7e commit 131a8d1844a03a64b986903924b7245e71647a70 @jimweirich committed Feb 23, 2011
Showing with 21 additions and 9 deletions.
  1. +17 −5 doc/command_line_usage.rdoc
  2. +4 −4 lib/rake/application.rb
View
22 doc/command_line_usage.rdoc
@@ -80,23 +80,35 @@ Options are:
Use the project level Rakefile, ignoring the system-wide (global)
rakefiles.
-[<tt>--tasks</tt> (-T)]
+[<tt>--tasks</tt> <em>pattern</em> (-T)]
Display a list of the major tasks and their comments. Comments
- are defined using the "desc" command.
+ are defined using the "desc" command. If a pattern is given, then
+ only tasks matching the pattern are displayed.
+
+[<tt>--no-top-level-dsl</tt> (-X)]
+ Do not put the Rake DSL commands into the top level scope.
+
+[<tt>--top-level-dsl</tt>]
+ Put the Rake DSL commands into the top level scope (default).
+
+ NOTE: Although currently Rake defaults to its DSL in the top level
+ scope, the plan is to deprecate this in the future and default ot
+ having the DSL commands *not* appear in the top level scope.
[<tt>--trace</tt> (-t)]
Turn on invoke/execute tracing. Also enable full backtrace on
errors.
-[<tt>--usage</tt> (-h)]
- Display a usage message and exit.
-
[<tt>--verbose</tt> (-v)]
Echo the Sys commands to standard output.
[<tt>--version</tt> (-V)]
Display the program version and exit.
+[<tt>--where</tt> <em>pattern</em> (-W)]
+ Display tasks that match <em>pattern</em> and the file and line
+ number where the task is defined.
+
In addition, any command line option of the form
<em>VAR</em>=<em>VALUE</em> will be added to the environment hash
<tt>ENV</tt> and may be tested in the Rakefile.
View
8 lib/rake/application.rb
@@ -313,6 +313,9 @@ def standard_rake_options
['--libdir', '-I LIBDIR', "Include LIBDIR in the search path for required modules.",
lambda { |value| $:.push(value) }
],
+ ['--no-search', '--nosearch', '-N', "Do not search parent directories for the Rakefile.",
+ lambda { |value| options.nosearch = true }
+ ],
['--prereqs', '-P', "Display the tasks and dependencies, then exit.",
lambda { |value| options.show_prereqs = true }
],
@@ -346,9 +349,6 @@ def standard_rake_options
['--rules', "Trace the rules resolution.",
lambda { |value| options.trace_rules = true }
],
- ['--no-search', '--nosearch', '-N', "Do not search parent directories for the Rakefile.",
- lambda { |value| options.nosearch = true }
- ],
['--silent', '-s', "Like --quiet, but also suppresses the 'in directory' announcement.",
lambda { |value|
Rake.verbose(false)
@@ -370,7 +370,7 @@ def standard_rake_options
Rake::TaskManager.record_task_metadata = true
}
],
- ['--no-top-level-dsl', '-X', "Do no put Rake DSL commands in the top level scope.",
+ ['--no-top-level-dsl', '-X', "Do not put Rake DSL commands in the top level scope.",
lambda { |value|
options.top_level_dsl = ! value
}

0 comments on commit 131a8d1

Please sign in to comment.