Re: [PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-11-18 Thread Chet Ramey
On 11/16/22 12:35 PM, Evan Gates wrote: On Mon Nov 14, 2022 at 1:00 PM MST, Chet Ramey wrote: On 10/3/22 2:56 PM, Evan Gates wrote: --- There is currently no good way to sort files by mtime in the shell. It's possible to do so with an ls that supports -t, but parsing ls is problematic.

Re: [PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-11-16 Thread Alex fxmbsw7 Ratchev
On Tue, Nov 15, 2022, 09:33 Alex fxmbsw7 Ratchev wrote: > i d be all for changeable glob s appearing > by chance integrate into loops expansion of array vars .. not just file globs .. > > On Tue, Nov 15, 2022, 02:40 Chet Ramey wrote: > >> On 10/3/22 2:56 PM, Evan Gates wrote: >> > --- >> > >>

Re: [PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-11-16 Thread Evan Gates
On Mon Nov 14, 2022 at 1:00 PM MST, Chet Ramey wrote: > On 10/3/22 2:56 PM, Evan Gates wrote: > > --- > > > > There is currently no good way to sort files by mtime in the shell. > > It's possible to do so with an ls that supports -t, but parsing ls is > > problematic. > > Thanks for the patch.

Re: [PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-11-15 Thread Alex fxmbsw7 Ratchev
i d be all for changeable glob s appearing On Tue, Nov 15, 2022, 02:40 Chet Ramey wrote: > On 10/3/22 2:56 PM, Evan Gates wrote: > > --- > > > > There is currently no good way to sort files by mtime in the shell. > > It's possible to do so with an ls that supports -t, but parsing ls is > >

Re: [PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-11-14 Thread Chet Ramey
On 10/3/22 2:56 PM, Evan Gates wrote: --- There is currently no good way to sort files by mtime in the shell. It's possible to do so with an ls that supports -t, but parsing ls is problematic. Thanks for the patch. There are some good things here, usable stuff, but I think I'll look at a

[PATCH] glob: add shopt globmtimesort to sort globs by mtime

2022-10-03 Thread Evan Gates
--- There is currently no good way to sort files by mtime in the shell. It's possible to do so with an ls that supports -t, but parsing ls is problematic. It's possible using GNU find's printf %T and nul separated lists with sort -z. Neither is a great option. This patch adds the ability to