Ticket #3031 (closed enhancement: invalid)
Implement natural sort order for files listings
Reported by: | birdie | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-core | Version: | master |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Currently, if you have these files in a directory
1
2
3
10
20
then MC will show them this way:
1
10
2
20
3
4
That is correct when comparing/sorting strings according to ASCII, but normally people expect natural sort order.
Please, add a checkbox for Sort Order called "Use natural sort order", which will force MC to take numbers into account.
BTW PHP4/5 has a function for it: http://php.net/manual/en/function.natsort.php - you can probably borrow their algorithm.
Change History
comment:4 in reply to: ↑ description ; follow-up: ↓ 5 Changed 11 years ago by andrew_b
Replying to birdie:
Please, add a checkbox for Sort Order called "Use natural sort order", which will force MC to take numbers into account.
This option already exists. It's name "Version".