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.11.2 lib/td/command/help.rb
td-0.11.1 lib/td/command/help.rb
td-0.10.99 lib/td/command/help.rb
td-0.10.98 lib/td/command/help.rb
td-0.10.97 lib/td/command/help.rb
td-0.10.96 lib/td/command/help.rb
td-0.10.95 lib/td/command/help.rb
td-0.10.94 lib/td/command/help.rb
td-0.10.93 lib/td/command/help.rb
td-0.10.92 lib/td/command/help.rb
td-0.10.91 lib/td/command/help.rb
td-0.10.90 lib/td/command/help.rb
td-0.10.89 lib/td/command/help.rb
td-0.10.88 lib/td/command/help.rb
td-0.10.87 lib/td/command/help.rb
td-0.10.86 lib/td/command/help.rb
td-0.10.85 lib/td/command/help.rb
td-0.10.84 lib/td/command/help.rb
td-0.10.83 lib/td/command/help.rb
td-0.10.82 lib/td/command/help.rb