[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tab completion sort by modification time

From: Greg Wooledge
Subject: Re: tab completion sort by modification time
Date: Fri, 26 Dec 2014 07:48:14 -0500
User-agent: Mutt/

On Thu, Dec 25, 2014 at 12:34:08AM -0500, kamaraju kusumanchi wrote:
> I would like to request a new feature in bash.
> When doing a tab completion inside a directory, I would like the files
> to be listed in the order of modification time (similar to ls -rt).

I think there would be a larger general interest if this were expanded
to a shopt that affects the ordering of globs as well.  It's pretty
common for people in #bash to ask for a script that will return the
oldest file (or newest file, or oldest 10 files, etc.) in a directory.
Doing this right now is possible (using [[ $file1 -ot $file2 ]] in a
loop) but awkward, particularly if you want more than one file.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]