Sha256: 8d25dda4044b147ce6a3cf85724cf664637d36c9320f9fb97689c8ce0b39efbb

Contents?: true

Size: 709 Bytes

Versions: 34

Compression:

Stored size: 709 Bytes

Contents

module TreasureData
module Command

  def help(op)
    cmd = op.cmd_parse

    c = List.get_option(cmd)
    if c == nil
       $stderr.puts "'#{cmd}' is not a td command. Run '#{$prog}' to show the list."
       List.show_guess(cmd)
       exit 1

    elsif c.name != cmd && c.group == cmd
      # group command
      $stdout.puts List.cmd_usage(cmd)
      exit 1

    else
      method, cmd_req_connectivity = List.get_method(cmd)
      method.call(['--help'])
    end
  end

  def help_all(op)
    cmd = op.cmd_parse

    TreasureData::Command::List.show_help(op.summary_indent)
    $stdout.puts ""
    $stdout.puts "Type '#{$prog} help COMMAND' for more information on a specific command."
  end

end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
td-0.17.1 lib/td/command/help.rb
td-0.17.0 lib/td/command/help.rb
td-0.16.10 lib/td/command/help.rb
td-0.16.9 lib/td/command/help.rb
td-0.16.8 lib/td/command/help.rb
td-0.16.7 lib/td/command/help.rb
td-0.16.6 lib/td/command/help.rb
td-0.16.5 lib/td/command/help.rb
td-0.16.4 lib/td/command/help.rb
td-0.16.3 lib/td/command/help.rb
td-0.16.1 lib/td/command/help.rb
td-0.16.0 lib/td/command/help.rb
td-0.15.9 lib/td/command/help.rb
td-0.15.8 lib/td/command/help.rb
td-0.15.7 lib/td/command/help.rb
td-0.15.6 lib/td/command/help.rb
td-0.15.5 lib/td/command/help.rb
td-0.15.4 lib/td/command/help.rb
td-0.15.3 lib/td/command/help.rb
td-0.15.2 lib/td/command/help.rb