Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (43 sloc) 1.19 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/bin/bash
[[ -z "$TM_FILEPATH" ]] &amp;&amp; TM_TMPFILE=$(mktemp -t pythonInTerm)
: "${TM_FILEPATH:=$TM_TMPFILE}"; cat &gt;"$TM_FILEPATH"
: ${TM_LUA:=newlisp}
require_cmd "$TM_LUA"
esc () {
STR="$1" ruby &lt;&lt;"RUBY"
str = ENV['STR']
str = str.gsub(/'/, "'\\\\''")
str = str.gsub(/[\\"]/, '\\\\\\0')
print "'#{str}'"
RUBY
}
osascript &lt;&lt;- APPLESCRIPT
tell app "Terminal"
launch
activate
do script "clear; cd $(esc "${TM_DIRECTORY}"); $(esc "${TM_LUA}") $(esc "${TM_FILEPATH}"); rm -f $(esc "${TM_TMPFILE}")"
set position of first window to { 100, 100 }
end tell
APPLESCRIPT
</string>
<key>input</key>
<string>document</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Run (Terminal)</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.newlisp</string>
<key>uuid</key>
<string>AC0513B0-6967-49E9-9BE9-E73BD2009028</string>
</dict>
</plist>
Something went wrong with that request. Please try again.