bug-bash
[Top][All Lists]
Advanced

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

Re: tab completion sort by modification time


From: Chet Ramey
Subject: Re: tab completion sort by modification time
Date: Thu, 01 Jan 2015 14:31:33 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/31/14 11:35 PM, kamaraju kusumanchi wrote:
> On Fri, Dec 26, 2014 at 7:48 AM, Greg Wooledge <address@hidden> wrote:
>> 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.

You can do most of this using ls and the `-1' option.  It does break
down when you encounter files with newlines in their names, but those
are quite rare in practice.

> 
> Cool! Thanks for your reply Greg. So it is obvious that there are
> others who would like to see this feature implemented.

The two features have little to do with each other, actually.

> How are the feature requests tracked for bash? Is it enough to send
> the email to this list or should I have to create an item at
> https://savannah.gnu.org/support/?group=bash&func=browse&set=open ?

I will put it on the list for consideration for a future version.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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