<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,12 +13,21 @@
 type _completion_ruby_init &amp;&gt;/dev/null &amp;&amp; return 1
 
 _CR_PATH=$(dirname &quot;$BASH_ARGV&quot;)
+# _cr_anycmd &lt;command&gt; [command...]
+# Returns success if any of the given commands is found, nonzero if
+# none of them exists.
+_cr_anycmd() {
+  for cmd in &quot;$@&quot;; do
+    type -- &quot;$cmd&quot; &amp;&gt;/dev/null &amp;&amp; return
+  done
+  return 1
+}
 # _cr_load &lt;script&gt; [additional commands]
 # Sources completion-&lt;script&gt;, if the file exists and either &lt;script&gt; or
 # any of the additional parameters names an existing command.
 _cr_load() {
   local script=$_CR_PATH/completion-$1
-  [[ -f $script ]] &amp;&amp; type &quot;$@&quot; &amp;&gt;/dev/null &amp;&amp; . &quot;$script&quot;
+  [[ -f $script ]] &amp;&amp; _cr_anycmd &quot;$@&quot; &amp;&amp; . &quot;$script&quot;
 }
 
 _cr_load gem gem1.8 gem1.9 jgem
@@ -27,7 +36,7 @@ _cr_load rails
 _cr_load rake
 _cr_load ruby ruby1.8 ruby1.9
 
-unset -f _cr_load
+unset -f _cr_load _cr_anycmd
 unset -v _CR_PATH
 
 # vim: ai ft=sh sw=2 sts=2 et</diff>
      <filename>completion-ruby-all</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6f99f4f3882d2b3e78f6d8168ba0e1e26d4f99c2</id>
    </parent>
  </parents>
  <author>
    <name>Daniel Luz</name>
    <email>dev@mernen.com</email>
  </author>
  <url>http://github.com/mernen/completion-ruby/commit/eacb02db57f6a7d19534b035f5e610414f8bb330</url>
  <id>eacb02db57f6a7d19534b035f5e610414f8bb330</id>
  <committed-date>2009-09-17T12:15:29-07:00</committed-date>
  <authored-date>2009-09-17T12:15:29-07:00</authored-date>
  <message>Fixed completions not loading if you don't have all of the possible commands available</message>
  <tree>5d1c2008b9a4464527e82f3edddea177c6c9fe6f</tree>
  <committer>
    <name>Daniel Luz</name>
    <email>dev@mernen.com</email>
  </committer>
</commit>
