[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/8] builtins/source: parse the -i option
From: |
Chet Ramey |
Subject: |
Re: [PATCH v2 5/8] builtins/source: parse the -i option |
Date: |
Fri, 17 May 2024 10:20:57 -0400 |
User-agent: |
Mozilla Thunderbird |
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?= <vq@larryv.me>
Message-ID: <0b3fa8d4-7a3f-4bd6-8e8d-f7d1746bef2f@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 to
one 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 chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, (continued)
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/16
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Lawrence Velázquez, 2024/05/16
- Stray comma in documentation of GLOBSORT, Lawrence Velázquez, 2024/05/17
- Re: Stray comma in documentation of GLOBSORT, Chet Ramey, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Greg Wooledge, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option,
Chet Ramey <=
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Martin D Kealey, 2024/05/21
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Robert Elz, 2024/05/17
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Chet Ramey, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Andreas Kähäri, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Matheus Afonso Martins Moreira, 2024/05/20
- Re: [PATCH v2 5/8] builtins/source: parse the -i option, Greg Wooledge, 2024/05/20