<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -88,10 +88,17 @@ class AckInProject::Search
     options &lt;&lt; &quot;--#{result['followSymLinks'] == 1 ? '' : 'no'}follow&quot;
     options &lt;&lt; &quot;--#{result['loadAckRC'] == 1 ? '' : 'no'}env&quot;
     
-    options &lt;&lt; &quot;--type=&quot;+plist['ackFileType'] if plist['ackFileType'] != 'All'
     # I don't know why ackFileType doesn't go into result. I am an Interface Builder n00b.
-    # (putting it into defaults instead of params didn't change anything)
-
+    # (putting it into defaults instead of params didn't change anything) ~David
+    options &lt;&lt; case plist['ackFileType']
+      when 'Normal'
+        ''
+      when 'All'
+        '--all-types'
+      else
+        '--type='+plist['ackFileType']
+      end
+    
     AckInProject.update_search_history result['returnArgument']
     AckInProject.update_pbfind result['returnArgument']
 </diff>
      <filename>Support/lib/search.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ class AckInProject::SearchDialog
       'ackExpression' =&gt; AckInProject.pbfind,
       'ackHistory' =&gt; AckInProject.search_history,
       'ackFileTypes' =&gt; filetypes,
-      'ackFileType' =&gt; 'All'
+      'ackFileType' =&gt; 'Normal'
     }
   end
   
@@ -44,55 +44,8 @@ class AckInProject::SearchDialog
   end
   
   def filetypes
-    # I'm sure there's a better way to do this. But I'm not familiar with it.
-    [
-      {'filetype'=&gt;'All'},
-      {'filetype'=&gt;'actionscript'},
-      {'filetype'=&gt;'asm'},
-      {'filetype'=&gt;'batch'},
-      {'filetype'=&gt;'binary'},
-      {'filetype'=&gt;'cc'},
-      {'filetype'=&gt;'cfmx'},
-      {'filetype'=&gt;'cpp'},
-      {'filetype'=&gt;'csharp'},
-      {'filetype'=&gt;'css'},
-      {'filetype'=&gt;'elisp'},
-      {'filetype'=&gt;'erlang'},
-      {'filetype'=&gt;'fortran'},
-      {'filetype'=&gt;'haskell'},
-      {'filetype'=&gt;'hh'},
-      {'filetype'=&gt;'html'},
-      {'filetype'=&gt;'java'},
-      {'filetype'=&gt;'js'},
-      {'filetype'=&gt;'jsp'},
-      {'filetype'=&gt;'lisp'},
-      {'filetype'=&gt;'lua'},
-      {'filetype'=&gt;'make'},
-      {'filetype'=&gt;'mason'},
-      {'filetype'=&gt;'objc'},
-      {'filetype'=&gt;'objcpp'},
-      {'filetype'=&gt;'ocaml'},
-      {'filetype'=&gt;'parrot'},
-      {'filetype'=&gt;'perl'},
-      {'filetype'=&gt;'php'},
-      {'filetype'=&gt;'plone'},
-      {'filetype'=&gt;'python'},
-      {'filetype'=&gt;'rake'},
-      {'filetype'=&gt;'ruby'},
-      {'filetype'=&gt;'scheme'},
-      {'filetype'=&gt;'shell'},
-      {'filetype'=&gt;'skipped'},
-      {'filetype'=&gt;'smalltalk'},
-      {'filetype'=&gt;'sql'},
-      {'filetype'=&gt;'tcl'},
-      {'filetype'=&gt;'tex'},
-      {'filetype'=&gt;'text'},
-      {'filetype'=&gt;'tt'},
-      {'filetype'=&gt;'vb'},
-      {'filetype'=&gt;'vim'},
-      {'filetype'=&gt;'xml'},
-      {'filetype'=&gt;'yaml'}
-    ]
+    # I'm sure there's a better way to pass these to the NIB than an array of objects... but I'm not familiar with it.
+    %x{#{e_sh ack} --help=types}.scan(/--\[no\]([^ ]+)/).unshift(['Normal'], ['All']).map{ |type_array| {'filetype'=&gt;type_array[0],} }
   end
 end
 </diff>
      <filename>Support/lib/search_dialog.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,8 +14,16 @@ class AckInProject::SearchResults
       :page_title   =&gt; title,
       :html_head    =&gt; header_extra()
     )
+    note = case plist['ackFileType']
+      when 'Normal'
+        ''
+      when 'All'
+        ' (all types)'
+      else
+        ' ('+plist['ackFileType']+' only)'
+      end
     puts &lt;&lt;-HTML
-      &lt;h2&gt;Searching for &#8220;#{ h search_string }&#8221; in #{ searched_in }#{plist['ackFileType'] == 'All' ? '' : (' ('+plist['ackFileType']+' only)')}&lt;/h2&gt;
+      &lt;h2&gt;Searching for &#8220;#{ h search_string }&#8221; in #{ searched_in }#{note}&lt;/h2&gt;
       &lt;div id=&quot;counters&quot;&gt;&lt;span id=&quot;linecount&quot;&gt;0 lines&lt;/span&gt; matched in &lt;span id=&quot;filecount&quot;&gt;0 files&lt;/span&gt;&lt;/div&gt;
       &lt;script type=&quot;text/javascript&quot;&gt;searchStarted();&lt;/script&gt;
       &lt;table id=&quot;results&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot;&gt;</diff>
      <filename>Support/lib/search_results.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ad6729c2b40cf804179bfbdc472f9047d49aeeec</id>
    </parent>
  </parents>
  <author>
    <name>David Lynch</name>
    <email>kemayo@gmail.com</email>
  </author>
  <url>http://github.com/adinardi/ack-tmbundle/commit/6a30a02477b8def66143f74083efc62c739a862d</url>
  <id>6a30a02477b8def66143f74083efc62c739a862d</id>
  <committed-date>2009-11-05T04:54:22-08:00</committed-date>
  <authored-date>2009-02-13T01:17:04-08:00</authored-date>
  <message>Dynamic generation of the filetypes list</message>
  <tree>315de19af81a7f06187e3e0200530427efbae184</tree>
  <committer>
    <name>Angelo DiNardi</name>
    <email>adinardi@fragtop.local</email>
  </committer>
</commit>
