Ticket #3031 (closed enhancement: invalid)

Opened 9 years ago

Last modified 9 years ago

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:1 Changed 9 years ago by andrew_b

  • Type changed from defect to enhancement

comment:2 follow-up: ↓ 3 Changed 9 years ago by ossi

isn't this a dupe of #1994 (and a "contra" of #1860)?

comment:3 in reply to: ↑ 2 Changed 9 years ago by birdie

Replying to ossi:

isn't this a dupe of #1994 (and a "contra" of #1860)?

That's why I'm asking to make this feature an option.

People will be happy to use what suits them better. I for one want natural sort order.

comment:4 in reply to: ↑ description ; follow-up: ↓ 5 Changed 9 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 name is "Version".

Last edited 9 years ago by andrew_b (previous) (diff)

comment:5 in reply to: ↑ 4 Changed 9 years ago by birdie

Replying to andrew_b:

This option already exists. It name is "Version".

Huh, it's very unobvious, but OK, close this request.

comment:6 Changed 9 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone Future Releases deleted
Note: See TracTickets for help on using tickets.