Sha256: 590c1c4f9d9dabf9df1700dd463811c1b388dc77428c61629375e165ea63c952

Contents?: true

Size: 663 Bytes

Versions: 78

Compression:

Stored size: 663 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
      puts List.cmd_usage(cmd)
      exit 1

    else
      method = 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)
    puts ""
    puts "Type '#{$prog} help COMMAND' for more information on a specific command."
  end

end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
td-0.10.81 lib/td/command/help.rb
td-0.10.79 lib/td/command/help.rb
td-0.10.78 lib/td/command/help.rb
td-0.10.77 lib/td/command/help.rb
td-0.10.76 lib/td/command/help.rb
td-0.10.75 lib/td/command/help.rb
td-0.10.74 lib/td/command/help.rb
td-0.10.73 lib/td/command/help.rb
td-0.10.72 lib/td/command/help.rb
td-0.10.71 lib/td/command/help.rb
td-0.10.70 lib/td/command/help.rb
td-0.10.69 lib/td/command/help.rb
td-0.10.68 lib/td/command/help.rb
td-0.10.67 lib/td/command/help.rb
td-0.10.66 lib/td/command/help.rb
td-0.10.65 lib/td/command/help.rb
td-0.10.64 lib/td/command/help.rb
td-0.10.63 lib/td/command/help.rb
td-0.10.62 lib/td/command/help.rb
td-0.10.61 lib/td/command/help.rb