andrewferrier/fzf-z

Prioritise $RECENTLY_USED_DIRS over $SUBDIRS in fzf output

hwallis93 opened this issue · 2 comments

There are three sources of directories that fzf-z sends to fzf to select from

  • $SUBDIRS
  • $RECENTLY_USED_DIRS
  • $EXTRA_DIRS

They're sent in the above order, meaning that $SUBDIRS appears first (i.e. at the bottom) in the fzf interface. I personally find I'm more likely to want to jump to a directory I've visited before than to a sub-directory.

This ordering means that if there's a fuzzy match for my search input in $SUBDIRS, it takes precedence over an exact match in $RECENTLY_USED_DIRS - which is very rarely what I want!

Thanks for this! I didn't really tend to notice this since I probably type more for my typeahead than you, but I agree with your logic, recently used dirs should definitely come first. I've switched this order around. Hope this helps.

Thanks - saves me having to add to the list of tools I've slightly modified :)