# How to sort file list in helm-find-files

When I use helm-find-files to search for a directory. I would like it to display exact matches and directories first in the list of candidates, followed by files.

For example, searching for "src" gives the following results:

How can I make "src" show up first, since it's an exact match and also a directory? Or, baring that, making hidden "." files go to the end of the list (since it seems to be in alphabetical order?)

• ^src\$ should match only src. – abo-abo Dec 31 '14 at 14:34
• @abo-abo yeah, I know I could add regexp for it, but I'd like to change the default sort order when it's not specified – Lee H Dec 31 '14 at 14:38
• Are you aware of the new flex matching, and do you want to turn it off? If you want this sort behavior with flex matching enabled (which it is by default), then I think the helm devs are working on it, but it's not ready yet. – PythonNut Jan 2 '15 at 5:04
• @LeeH the github issue is the source for all information helm-fuzzy related at the moment. – PythonNut Jan 2 '15 at 15:58
• @LeeH You should update to the latest Helm. It is fixed now. A new custom variable is added: helm-find-files-sort-directories. To enable your desired behavior, set it to t. – Tu Do Jan 4 '15 at 14:13