Method: Bundler::Thor.command_help
- Defined in:
- lib/bundler/vendor/thor/lib/thor.rb
permalink .command_help(shell, command_name) ⇒ Object Also known as: task_help
Prints help information for the given command.
Parameters
shell<Bundler::Thor::Shell> command_name<String>
258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 258 def command_help(shell, command_name) meth = normalize_command_name(command_name) command = all_commands[meth] handle_no_command_error(meth) unless command shell.say "Usage:" shell.say " #{(command).split("\n").join("\n ")}" shell.say (shell, nil => command..values) (shell, command) (shell, command) if command.long_description shell.say "Description:" if command.wrap_long_description shell.print_wrapped(command.long_description, indent: 2) else shell.say command.long_description end else shell.say command.description end end |