Sha256: ab1d9253604295d6e32595b3bd3c3f0c98a441f3632e06365ee57034f2449aba

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

# -*- coding: utf-8 -*-
# Copyright (C) 2010-2011, 2015 Rocky Bernstein <rockyb@rubyforge.net>
require_relative 'base/submgr'

class Trepan::Command::ShowCommand < Trepan::SubcommandMgr
  unless defined?(HELP)
    NAME = File.basename(__FILE__, '.rb')
    HELP = <<-HELP
**#{NAME}** [*show-subcommand*]

Generic command for showing things about the debugger.  You can
give unique prefix of the name of a subcommand to get
information about just that subcommand.

Type `#{NAME}` for a list of *#{NAME}* subcommands and what they do.
Type `help #{NAME} *` for just the list of `#{NAME}` subcommands.
    HELP

    CATEGORY      = 'status'
    NEED_STACK    = false
    SHORT_HELP    = 'Show parts of the debugger environment'
  end

  def run(args)
    if args.size > 1
      first = args[1].downcase
      alen = 'auto'.size
      args[1..1] = ['auto', first[alen..-1]] if
        first.start_with?('auto') && first.size > alen
    end
    super
  end

end

if __FILE__ == $0
  require_relative '../mock'
  dbgr, cmd = MockDebugger::setup
  cmd.run([cmd.name])
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trepanning-2.15.35 processor/command/show.rb
trepanning-1.93.35 processor/command/show.rb
trepanning-2.15.33 processor/command/show.rb
trepanning-1.93.32 processor/command/show.rb