<?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>#!/usr/bin/env ruby -wKU
require "#{ENV['TM_SUPPORT_PATH']}/lib/osx/plist"
text = STDIN.read

if text =~ /\A(#!.*\n)#\n((?:#.+$\n)*)#\n/
  shebang, head, body = $1, $2, $'

  plist = { 'command' =&gt; shebang + body }
  head.scan(/#\s+([^:]*): (.*)$/) { plist[$1] = $2 }
  STDOUT &lt;&lt; plist.to_plist
else
  STDOUT &lt;&lt; text
end
</string>
	<key>hideFromUser</key>
	<string>1</string>
	<key>input</key>
	<string>document</string>
	<key>inputFormat</key>
	<string>text</string>
	<key>name</key>
	<string>Export TM Commands</string>
	<key>outputCaret</key>
	<string>interpolateByLine</string>
	<key>outputFormat</key>
	<string>text</string>
	<key>outputLocation</key>
	<string>replaceDocument</string>
	<key>scope</key>
	<string>attr.rev-path.tmCommand</string>
	<key>semanticClass</key>
	<string>callback.document.export</string>
	<key>uuid</key>
	<string>E2C42B70-5823-49A7-A259-A1622EBD191C</string>
	<key>version</key>
	<integer>2</integer>
</dict>
</plist>
