Permalink
Browse files

removes .rb from dragged filename

  • Loading branch information...
1 parent 2313ae1 commit 41831ff0c90f3c8d5f25f3b75f085d238a07c5b4 @drnic committed Jun 3, 2008
Showing with 4 additions and 1 deletion.
  1. +4 −1 DragCommands/Require Ruby Files.tmDragCommand
@@ -5,7 +5,10 @@
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
- <string>echo "require File.dirname(__FILE__) + '/$TM_DROPPED_FILE'"</string>
+ <string>#!/usr/bin/env ruby
+
+file_path = ENV['TM_DROPPED_FILE'].gsub(/\.rb$/, '')
+puts "require File.dirname(__FILE__) + '/#{file_path}'"</string>
<key>draggedFileExtensions</key>
<array>
<string>rb</string>

0 comments on commit 41831ff

Please sign in to comment.