Sha256: d4a1b712b78da98a00680c477d32ea383b9037d6f43a3e2fd668e5f0a5374e3d
Contents?: true
Size: 762 Bytes
Versions: 6
Compression:
Stored size: 762 Bytes
Contents
module Trepan # Implements debugger "source" command. class SourceCommand < OldCommand self.allow_in_control = true def regexp /^\s* so(?:urce)? \s+ (.+) $/x end 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 Trepan.run_script(file, @state) end end class << self def help_command 'source' end def help(cmd) %{ source FILE\texecutes a file containing debugger commands } end end end end
Version data entries
6 entries across 6 versions & 1 rubygems