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.60 lib/td/command/help.rb
td-0.10.59 lib/td/command/help.rb
td-0.10.58 lib/td/command/help.rb
td-0.10.57 lib/td/command/help.rb
td-0.10.56 lib/td/command/help.rb
td-0.10.55 lib/td/command/help.rb
td-0.10.54 lib/td/command/help.rb
td-0.10.53 lib/td/command/help.rb
td-0.10.52 lib/td/command/help.rb
td-0.10.51 lib/td/command/help.rb
td-0.10.50 lib/td/command/help.rb
td-0.10.49 lib/td/command/help.rb
td-0.10.48 lib/td/command/help.rb
td-0.10.47 lib/td/command/help.rb
td-0.10.46 lib/td/command/help.rb
td-0.10.45 lib/td/command/help.rb
td-0.10.44 lib/td/command/help.rb
td-0.10.43 lib/td/command/help.rb
td-0.10.42 lib/td/command/help.rb
td-0.10.41 lib/td/command/help.rb