Sha256: dfd60d50520aea4a203ad18796f5479f38503dd8c11275c8d1ab8d00ffba2c6d

Contents?: true

Size: 852 Bytes

Versions: 4

Compression:

Stored size: 852 Bytes

Contents

module Commands

  def Commands.help(options)
    if !options.params.empty? && Commands.respond_to?(options.params.first.to_sym)
      method_name = "print_#{options.params.first}_help".to_sym
      Commands.method(method_name).call()
    else
      print_general_help
    end
  end

  private

  def Commands.print_general_help
    puts <<-END.gsub(/^ {6}/, '')
      p4util [command] [params]

      Executes various commands useful when writing Perforce applications.

      Use `p4util help [command]` for more information on each command.

      List of available commands:
        download - Download Perforce binaries for your platform
        init - Seed the local p4d instance using local configuration files
        kill - Shutdown p4d processes using SIGTERM
        start - Spawn the p4d process in your working directory
    END
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
p4util-0.1.0 ./lib/commands/help.rb
p4util-0.0.3 ./lib/commands/help.rb
p4util-0.0.2 ./lib/commands/help.rb
p4util-0.0.1 ./lib/commands/help.rb