Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removes .rb from dragged filename

  • Loading branch information...
commit 41831ff0c90f3c8d5f25f3b75f085d238a07c5b4 1 parent 2313ae1
Dr Nic Williams authored June 03, 2008
5  DragCommands/Require Ruby Files.tmDragCommand
@@ -5,7 +5,10 @@
5 5
 	<key>beforeRunningCommand</key>
6 6
 	<string>nop</string>
7 7
 	<key>command</key>
8  
-	<string>echo "require File.dirname(__FILE__) + '/$TM_DROPPED_FILE'"</string>
  8
+	<string>#!/usr/bin/env ruby
  9
+
  10
+file_path = ENV['TM_DROPPED_FILE'].gsub(/\.rb$/, '')
  11
+puts "require File.dirname(__FILE__) + '/#{file_path}'"</string>
9 12
 	<key>draggedFileExtensions</key>
10 13
 	<array>
11 14
 		<string>rb</string>

0 notes on commit 41831ff

Please sign in to comment.
Something went wrong with that request. Please try again.