Zsh-autocomplete: Recent directorie/file suggestions from fasd are sorted reverse ranking

Created on 29 Jul 2020  路  4Comments  路  Source: marlonrichert/zsh-autocomplete

Describe the bug

The recent directory and file suggestions which come from fasd are sorted in wrong order. Actually they are sorted by rank reverse. So the suggestion with the lowest rank is sorted first, the highest rank last. I haven't looked into your implementation, but fasd does list candidates with the bottom line highest priority. You can pass the -R parameter to reverse this order if that should fit better to you.

To Reproduce

Use fasd and add some paths which share something in common (to get multiple results when complete). Checkout the ranking fasd did with fasd -s <what-paths-have-in-common>. Now do a cd <what-paths-have-in-common> and observe the recent directory group. The order is reverse to the ranking before.

Expected behavior

The suggestion candidates for the recent directory group should be sorted by highest rank first.

Actual behavior

Reverse rank order.

Desktop

  • OS + distribution: 5.7.2-arch1-1
  • Zsh version: zsh 5.8 (x86_64-pc-linux-gnu)
  • Plugin version: 764ae14951e94014bdff838b842f41147aec0fcb

Additional context

Use fasd to get recent directory/file suggestions.

Bug report

All 4 comments

Thanks for pointing this out. I wonder if any of the other dir jumping plugins I support list their results in a different order from the one I'm expecting. I'll have to investigate.

@weilbith It's on dev now. Please try.

Yes this works! :+1:

Btw, I wanted to say thank you again that you improved the matching as side feature on my last request. This is so much better to use!! :pray:

Available now on master.

Was this page helpful?
0 / 5 - 0 ratings