class Byebug::SourceCommand

Implements byebug “source” command.

def execute

def execute
  file = File.expand_path(@match[1]).strip
  unless File.exist?(file)
    errmsg "Command file '#{file}' is not found\n"
    return
  end
  if @state and @state.interface
    @state.interface.command_queue += File.open(file).readlines
  else
    Byebug.run_script(file, @state)
  end
end

def help(cmd)

def help(cmd)
  %{
    source FILE\texecutes a file containing byebug commands
  }
end

def help_command

def help_command
  'source'
end

def regexp

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