Permalink
Browse files

Add record all to Darcs bundle

git-svn-id: http://svn.textmate.org/trunk/Bundles/Darcs.tmbundle@1619 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
David Powers
David Powers committed Aug 26, 2005
1 parent 7122ee1 commit f9748aab308ec0b54133423795266e2ea6759133
Showing with 33 additions and 0 deletions.
  1. +33 −0 Commands/Record All.plist
View
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>beforeRunningCommand</key>
+ <string>saveModifiedFiles</string>
+ <key>command</key>
+ <string>cd "$TM_DIRECTORY";
+
+"${TM_RUBY:=ruby}" &lt;&lt;'EOF'
+output = `CocoaDialog inputbox --title Input --informative-text 'Record Message' --button1 Record --button2 'Abort'`
+output = output.split("\n")
+
+# check the button pressed, exit if it wasn't Record
+if(output[0] !~ /^1$/)
+ exit
+end
+
+output = `darcs record -a -m '#{output[1].strip.gsub(/'/, '\\\\1')}'`
+
+puts(output)</string>
+ <key>input</key>
+ <string>none</string>
+ <key>keyEquivalent</key>
+ <string>@d</string>
+ <key>name</key>
+ <string>Record All</string>
+ <key>output</key>
+ <string>showAsTooltip</string>
+ <key>uuid</key>
+ <string>1C9B5F32-759D-4B3E-BA91-A83897C48026</string>
+</dict>
+</plist>

0 comments on commit f9748aa

Please sign in to comment.