On 5/17/24 2:42 AM, Robert Elz wrote:
Date: Thu, 16 May 2024 23:54:12 -0400 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= <v...@larryv.me> Message-ID: <0b3fa8d4-7a3f-4bd6-8e8d-f7d1746be...@app.fastmail.com>| This is the description from the bash.1 that's currently in my local | repository: Thanks. Possibly useful I guess - though I'm not really sure about a possible need to stat() every file from a glob result because that got set toone of the options that needs it.
If you set the variable to something that needs it, you have to accept the stat overhead -- otherwise, how could it do what you've requested?
"nosort" seems likely to be the most useful of the available options (that description didn't say what "-nosort" means though - backwards from the order in the directory?)
If `nosort' means no sorting, there is no imposed ordering, and ascending and descending are meaningless.
One option that might be useful (and cheap) which isn't there would be to do a numeric sort (falling back to simple strcmp on equality) on the file names - I use MH (nmh) for my mail, and needing to use ? ?? ??? ???? ????? to get the files in the "correct" order (ie: not 1 10 100 1000 10000 10001 ...) would be useful.
I'll consider it. What name would you propose for it?
And if you're going to do all of that, why not have a list of sort specs, so one can do "blocks,-size,mtime,..." to specify what happens to files with the same number of blocks (and in this case, size, mod time).
Because it's a complication that may or may not be worth implementing without some critical mass of people asking for it. Let's see how this goes first. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature