Sha256: a259ea9a42db7142fc30a71b8f381e4bb437eb0abd36305bc76a889ccc0b1f09

Contents?: true

Size: 678 Bytes

Versions: 5

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

command :help do
  desc 'Display this help text'
  action do |context|
    puts "\e[35mWelcome to Schmersion v#{Schmersion::VERSION}\e[0m"
    puts 'For documentation see https://github.com/krystal/schmersion.'
    puts

    puts 'The following commands are supported:'
    puts
    context.cli.commands.sort_by { |k, _v| k.to_s }.each do |_, command|
      if command.description
        puts "  \e[36m#{command.name.to_s.ljust(18, ' ')}\e[0m #{command.description}"
      end
    end
    puts
    puts 'For details for the options available for each command, use the --help option.'
    puts "For example 'schmersion pending --help'."
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
schmersion-1.1.3 cli/help.rb
schmersion-1.1.2 cli/help.rb
schmersion-1.1.0 cli/help.rb
schmersion-1.0.1 cli/help.rb
schmersion-1.0.0 cli/help.rb