beforeRunningCommand nop command #!/usr/bin/env ruby -wKU require 'pathname' require "#{ENV['TM_SUPPORT_PATH']}/lib/escape.rb" from_path = Pathname.new(ENV['TM_FILEPATH'] || '.').dirname.realpath to_path = Pathname.new(ENV['TM_DROPPED_FILE']).realpath begin path = to_path.relative_path_from(from_path) rescue ArgumentError path = to_path end lib = path.to_s.sub(/\.rb\z/i, '') puts %Q{require "#{e_sn(lib).gsub('"', '\"')}"} draggedFileExtensions rb input selection name Require Ruby File output insertAsSnippet scope source.ruby uuid C122CD92-DDBE-4869-9C7A-CC2B254C9411