class Byebug::ShowCommand

Implements byebug “show” command.

def description

def description
  %{
    Generic command for showing things about byebug.
  }
end

def execute

def execute
  if not @match[1]
    print format_subcmds(Subcommands)
  else
    args = @match[1].split(/[ \t]+/)
    param = args.shift
    subcmd = find(Subcommands, param)
    if subcmd
      print "%s\n" % show_setting(subcmd.name)
    else
      print "Unknown show command #{param}\n"
    end
  end
end

def help(args)

def help(args)
  if args[1]
    subcmd = find(Subcommands, args[1])
    return "Invalid \"show\" subcommand \"#{args[1]}\"." unless subcmd
    str = subcmd.short_help + '.'
    str += "\n" + subcmd.long_help if subcmd.long_help
    return str
  end
  ShowCommad.description + format_subcmds(Subcommands)
end

def names

def names
  %w(show)
end

def regexp

def regexp
  /^show (?: \s+ (.+) )?$/xi
end