Re: [PATCH v2 5/8] builtins/source: parse the -i option
From:
Greg Wooledge
Subject:
Re: [PATCH v2 5/8] builtins/source: parse the -i option
Date:
Fri, 17 May 2024 07:18:46 -0400
On Fri, May 17, 2024 at 01:42:43PM +0700, Robert Elz wrote:
> [GLOBSORT]
> 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. "nosort" seems likely to be the most
> useful of the available options
My immediate first thought was the "mtime" option. No more need to
use "ls --magic-options-here -t" and eval the output stream, to get
the 10 oldest/newest log files? Yes please!
Other than that one niche case, I don't see an immediate use for it,
but it's a potentially powerful tool to have in the box. I'm sure
someone will find clever uses for it.
> (that description didn't say what "-nosort"
> means though - backwards from the order in the directory?)
Heh. I would imagine -nosort is the same as nosort, but hell, Chet
might surprise me on this one.