<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,10 +18,6 @@
 
 cur=${words[2, -1]}
 
-ret=$(autojump --completion &quot;${cur[*]}&quot;)
-
-if [ &quot;$ret&quot; != &quot;&quot; ]; then  #&#160;if at least one answer
-    for i in $(echo &quot;$ret&quot;); do
-        compadd -U $i # add all of them as possible completion
-    done
-fi
+autojump --completion ${cur[*]} | while read i; do 
+    compadd -U $i; 
+done</diff>
      <filename>_j</filename>
    </modified>
    <modified>
      <diff>@@ -93,7 +93,7 @@ def open_dic(dic_file,error_recovery=False):
 
 #Main code
 try:
-    optlist, args = getopt.getopt(argv[1:], 'a',['stat','import','completion']) 
+    optlist, args = getopt.getopt(argv[1:], 'a',['stat','import','completion', 'bash']) 
 except getopt.GetoptError, e:
     print &quot;Unknown command line argument: %s&quot; % e
     exit(1)
@@ -147,7 +147,7 @@ else:
         if dead_dirs and not completion: #save the dict if there were some non-existent directories in the database
             save(path_dict,dic_file)
 
-        if completion: quotes='&quot;'
+        if completion and ('--bash', '') in optlist: quotes='&quot;'
         else: quotes=&quot;&quot;
 
         if userchoice!=-1:</diff>
      <filename>autojump</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ _autojump()
         COMPREPLY=()
         unset COMP_WORDS[0] #remove &quot;j&quot; from the array
         cur=${COMP_WORDS[*]}
-        IFS=$'\n' read -d '' -a COMPREPLY &lt; &lt;(autojump --completion &quot;$cur&quot;)
+        IFS=$'\n' read -d '' -a COMPREPLY &lt; &lt;(autojump --bash --completion &quot;$cur&quot;)
         return 0
 }
 complete -F _autojump j</diff>
      <filename>autojump.bash</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>92ef70ffce5cda7d3781fe274ed8744264081ce8</id>
    </parent>
  </parents>
  <author>
    <name>Joel Schaerer</name>
    <email>joelthelion@laposte.net</email>
  </author>
  <url>http://github.com/joelthelion/autojump/commit/0ec15907e3f63ef09182a8d183832bc26356270c</url>
  <id>0ec15907e3f63ef09182a8d183832bc26356270c</id>
  <committed-date>2009-10-03T11:25:16-07:00</committed-date>
  <authored-date>2009-10-03T11:25:16-07:00</authored-date>
  <message>fixes for zsh. Thanks simon!!!</message>
  <tree>040206df69647d0f27a599fb9269af3dec71e55a</tree>
  <committer>
    <name>Joel Schaerer</name>
    <email>joelthelion@laposte.net</email>
  </committer>
</commit>
