Skip to content
Browse files

search cmi command

git-svn-id: http://svn.textmate.org/trunk/Bundles/OCaml Experimental Completions.tmbundle@6525 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent dd83001 commit 716412ba860816b7181cb056dbd98101fdd1c356 David Powers committed Feb 4, 2007
Showing with 5 additions and 4 deletions.
  1. +5 −4 Commands/Search _cmi.tmCommand
View
9 Commands/Search _cmi.tmCommand
@@ -7,17 +7,18 @@
<key>command</key>
<string>#!/usr/bin/env ruby
+require "#{ENV['TM_SUPPORT_PATH']}/lib/ocamlcompletion"
require "#{ENV['TM_SUPPORT_PATH']}/lib/plist"
searchstring = $stdin.read.strip
plist = "{ignoreCase = 0; regularExpression = 0; searchString = \"#{searchstring}\"; }"
options = `'#{ENV['TM_SUPPORT_PATH']}/bin/tm_dialog' -p '#{plist}' -m '#{ENV['TM_BUNDLE_SUPPORT']}/nibs/SearchWindow.nib' | pl`
-options = PropertyList.load(options)
-if $? == 0
- answers = `'#{ENV['TM_SUPPORT_PATH']}/bin/cmigrep -a #{options['searchString']}'`
+options = PropertyList.load(options)
+if options['returnButton'] == 'Search'
+ answers = OCamlCompletion::cmigrep(options['searchString'])
puts answers
end</string>
<key>fallbackInput</key>
@@ -29,7 +30,7 @@ end</string>
<key>name</key>
<string>Search .cmi</string>
<key>output</key>
- <string>showAsHTML</string>
+ <string>showAsTooltip</string>
<key>scope</key>
<string>source.ocaml</string>
<key>uuid</key>

0 comments on commit 716412b

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