On Thu, Apr 22, 2021 at 04:22:59PM -0500, Derek Martin wrote: > > > Anything other than alphabatical sorting is pretty useless with a long > > > list of directories, especially as it often puts .. somewhere other > > > than at the top. > [...] > > I have a patch which automatically changes to alphabetical sorting when > > showing directory contents (this requires to build from source). > > I have wanted this forever and have just been too lazy to hack up a > patch for it. I do not think any other behavior makes sense, and I do > think this should be the default behavior. Thanks. > > I haven't (yet) looked at the context of the patch so I won't comment > on it other than to say I would probably use bool (from stdbool.h) > instead of short--It conceptually matches the intent of the code and > FWIW has been available since C99. Thanks for the feedback. The reason why I picked a short was to stick as close as possible to the original coding style (from my limited knowledge about the code base). Other than that, you raise valid points.
> One could argue there should be a config variable to control this > sorting behavior, but I personally would neither make nor support that > argument. =8^) As you said yourself, no other behavior makes sense. Either you agree and apply the patch or you don't - no need for a config variable. ;) And you can still change the sort order while examining the directory.