#2440·lf

Limitation on replacing locale sort with custom sort.

Author: SirZenithCreated Mar 17, 2026Updated Jun 5, 2026

I notice that locale sort is removed from lf, and sorting file with custom info is added. When I try to implement locale sort with script I notice several problems:

  • It's impossible to run on-load hook for a directory with large amount of file in it. All file names in that directory are passed as arguments to on-load command, and when total character count get larger than max argument length allowed by system, lf won't be able to start shell to run on-load command.
  • Slow, it's really slow. When I have like 1300 files in the directory, with their file name to be 22 bytes long on average (not such a long name for non-ASCII names). I have to split addcustominfo calls into multiple lf remote calls, because the same argument length limitation mentioned previously , no matter how many remote calls I split them into, that's still 1300 addcustominfo calls though. And it took about 50 seconds to settle the ordering of file list. And, the less remote calls I used, the longer lf get frozen. I wouldn't call this usable.

Any advice on work this around? Or should be fix in the software?