Sha256: 5b75c6d57acd79ce3f478ae3823a89f14ef8b38ba6c3d8e6357ab3c594a519a9
Contents?: true
Size: 893 Bytes
Versions: 9
Compression:
Stored size: 893 Bytes
Contents
module Debugger if RUBY_PLATFORM =~ /darwin/ class TextMateCommand < Command # :nodoc: def regexp /^\s*tm(?:ate)?(?:\s*(\d+))?$/ end def execute if @match[1] frm_n = @match[1].to_i if frm_n > @state.frames.size || frm_n == 0 print "Wrong frame number\n" return end frame = @state.frames[frm_n - 1] file, line = frame.file, frame.line else file, line = @state.file, @state.line end %x|open 'txmt://open?url=file://#{File.expand_path(file)}&line=#{line}'| end class << self def help_command 'tmate' end def help(cmd) %{ tm[ate] n\topens a current file in TextMate. \t\tIt uses n-th frame if arg (n) is specifed. } end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems