class Byebug::InfoCommand


Show info about different aspects of the debugger.

def description

def description
  prettify <<-EOD
    info[ subcommand]
    Generic command for showing things about the program being debugged.
  EOD
end

def execute

def execute
  return puts(self.class.help) unless @match[1]
  args = @match[1].split(/[ \t]+/)
  param = args.shift
  subcmd = Command.find(Subcommands, param)
  return errmsg "Unknown info command #{param}\n" unless subcmd
  if @state.context
    send("info_#{subcmd.name}", *args)
  else
    errmsg "'info #{subcmd.name}' not available without a context.\n"
  end
end

def info_file(*args)

def info_file(*args)
  file = args[0] || @state.file
  unless File.exist?(file)
    return errmsg(pr('info.errors.undefined_file', file: file))
  end
  puts <<-EOC.gsub(/^ {6}/, '')
    File #{info_file_basic(file)}
    Breakpoint line numbers:
    #{info_file_breakpoints(file)}
    Modification time: #{info_file_mtime(file)}
    Sha1 Signature: #{info_file_sha1(file)}
  EOC
end

def names

def names
  %w(info)
end

def regexp

def regexp
  /^\s* i(?:nfo)? (?:\s+(.+))? \s*$/x
end