class Byebug::ShowCommand

Implements byebug “show” command.

def execute

def execute
  if not @match[1]
    print_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)
  # specific subcommand help
  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
  # general help
  s = "
    Generic command for showing things about byebug.
    --
    List of show subcommands:
    --
  "
  for subcmd in Subcommands do
    s += "show #{subcmd.name} -- #{subcmd.short_help}\n"
  end
  return s
end

def help_command

def help_command
  "show"
end

def regexp

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