<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -32,19 +32,18 @@ j() {
   # we're in $HOME all the time, let something else get all the good letters
   [ &quot;$*&quot; = &quot;$HOME&quot; ] &amp;&amp; return
   awk -v q=&quot;$*&quot; -v t=&quot;$(date +%s)&quot; -F&quot;|&quot; '
+   BEGIN { l[q] = 1; d[q] = t }
    $2 &gt;= 1 { 
     if( $1 == q ) {
      l[$1] = $2 + 1
      d[$1] = t
-     found = 1
     } else {
      l[$1] = $2
      d[$1] = $3
-     count += $2
     }
+    count += $2
    }
    END {
-    if( !found ) l[q] = 1 &amp;&amp; d[q] = t
     if( count &gt; 1000 ) {
      for( i in l ) print i &quot;|&quot; 0.9*l[i] &quot;|&quot; d[i] # aging
     } else for( i in l ) print i &quot;|&quot; l[i] &quot;|&quot; d[i]
@@ -87,9 +86,10 @@ j() {
   awk -v q=&quot;$*&quot; -v t=&quot;$(date +%s)&quot; -v r=&quot;$recent&quot; -F&quot;|&quot; '
    BEGIN { f = 2; split(q,a,&quot; &quot;); if( r ) f = 3 }
    {
-    if( system(&quot;test -d \&quot;&quot; $1 &quot;\&quot;&quot;) ) next
     for( i in a ) $1 !~ a[i] &amp;&amp; $1 = &quot;&quot;
-    if( $1 ) if( f == 3 ) { print t - $f &quot;\t&quot; $1 } else print $f &quot;\t&quot; $1
+    if( $1 ) if( f == 3 ) {
+     print t - $f &quot;\t&quot; $1
+    } else print $f &quot;\t&quot; $1
    }
   ' $jfile 2&gt;/dev/null | sort -n$recent
  # if we hit enter on a completion just go there
@@ -100,7 +100,6 @@ j() {
   out=$(awk -v q=&quot;$*&quot; -v s=&quot;$short&quot; -v r=&quot;$recent&quot; -F&quot;|&quot; '
    BEGIN { split(q,a,&quot; &quot;); if( r ) { f = 3 } else f = 2 }
    { 
-    if( system(&quot;test -d \&quot;&quot; $1 &quot;\&quot;&quot;) ) next
     for( i in a ) $1 !~ a[i] &amp;&amp; $1 = &quot;&quot;
     if( $1 ) {
      if( s ) {
@@ -114,7 +113,6 @@ j() {
     if( ! x ) {
      close(FILENAME)
      while( getline &lt; FILENAME ) {
-      if( system(&quot;test -d \&quot;&quot; $1 &quot;\&quot;&quot;) ) continue
       for( i in a ) tolower($1) !~ tolower(a[i]) &amp;&amp; $1 = &quot;&quot;
       if( $1 ) {
        if( s ) {</diff>
      <filename>j.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>51db16f8ff7d4783612b315ae12b7882d016a645</id>
    </parent>
  </parents>
  <author>
    <name>rupa</name>
    <email>rupa@lrrr.us</email>
  </author>
  <url>http://github.com/rupa/j/commit/7e6ac25ada74317eeeb3bce8d079f840a17ed33d</url>
  <id>7e6ac25ada74317eeeb3bce8d079f840a17ed33d</id>
  <committed-date>2009-05-18T16:06:02-07:00</committed-date>
  <authored-date>2009-05-18T16:06:02-07:00</authored-date>
  <message>refine the PROMPT_COMMAND part a bit; eliminate redundant directory tests now that we already check for them</message>
  <tree>9469d9128e15da594a8a55839a3ff27f434347e8</tree>
  <committer>
    <name>rupa</name>
    <email>rupa@lrrr.us</email>
  </committer>
</commit>
