I know that.Actually compare_strnatcmp() wraps strnatcmp()
This link IS helpful; (If I wanted to implement it, which I don't, but Christian seems to... )
Cheers.
Moderators: Hacker, petermad, Stefan2, white
I like the shortcuts idea but the use of the (nat.) bit next to the Name tab is even better, very practical, clear to the user and I guess easy to implement!Hacker wrote:My idea would be switching the sort order using Ctrl-F1 when in Brief (or Ctrl-F2 in Full) and indicating the current order for instance by showing "(nat.)" next to the Name column header (like "Name (nat.)").
I would also appreciate the possibility to quickly change from "sort by name naturally" to "sort by name" (normally, lexically). This could be achieved by adding a command such as cm_ToggleSortByNameMode which would affect the commands cm_SrcByName, cm_LeftByName and cm_RightByName.Hacker wrote:My idea would be switching the sort order using Ctrl-F1 when in Brief (or Ctrl-F2 in Full) ...
I agree.Hacker wrote:... and indicating the current order for instance by showing "(nat.)" next to the Name column header (like "Name (nat.)").
On the one hand adding a checkbox next to the Name column header would be practical. It would even allow to set the "name sort mode" for the right and the left window independently. On the other hand I guess it costs considerably more to implement and it would look a bit ugly and crowded.pdavit wrote:I like the shortcuts idea but the use of the (nat.) bit next to the Name tab is even better, very practical, clear to the user and I guess easy to implement!
To quote Belinda: Ooooo, haven is a place on earth!ghisler(Author) wrote:Just for your info, I have now added natural sorting to TC. The above code wasn't quite what I expected (too simple), so I wrote my own. I will consider a method to change the sort type quickly.
Great, thanks!ghisler(Author) wrote:Just for your info, I have now added natural sorting to TC.
Also the coding style may not satisfy everyone, but nevertheless I'm grateful for strnatcmp.c because it is available, freely usable and it inspires others like you. I think this little example nicely shows the power of Open Source.ghisler(Author) wrote:The above code wasn't quite what I expected (too simple), so I wrote my own.
I don’t agree any more because I imagine that many users (including me) will use the natural sort mode most of the time and I prefer clean column headers. A suffix such as " (nat.)" gets annoying in the long run. I see the following alternatives to indicate the current sort mode for name sorting:Hacker wrote:... and indicating the current order for instance by showing "(nat.)" next to the Name column header (like "Name (nat.)").
Yes, I hope so too! Furthermore natural sorting could be applied to the extensions themselves because they are strings too. Sometimes I append an index to temporary backup files. Example: a.doc.1, a.doc.2 ... (although more often a-1.doc, a-2.doc ...).Hacker wrote:BTW: Does this natural sorting also apply to file names when sorting by extensions? (I hope yes.)