Natural sort order for Nautilus?



A good algorithm (linear performance, zlib license) and explanation is here:

http://sourcefrog.net/projects/natsort/

>From the site:

"Computer string sorting algorithms generally don't order strings
containing numbers in the same way that a human would do. Consider:

rfc1.txt
rfc2086.txt
rfc822.txt

It would be more friendly if the program listed the files as

rfc1.txt
rfc822.txt
rfc2086.txt

Filenames sort properly if people insert leading zeros, but they don't
always do that."

It does a good job of complex situations and would be good for things
like music files (track 9 before track 10 without leading zeros, for
example). Any reason why nautilus shouldn't do this?

Take care,
Drew.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]