Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: filename cycling according to age, not name
- X-seq: zsh-users 7633
- From: Kai Grossjohann <kai@xxxxxxxxxxxxxx>
- To: J <jean.chalard@xxxxxxxxxxx>
- Subject: Re: filename cycling according to age, not name
- Date: Wed, 30 Jun 2004 16:13:05 +0200
- Cc: Kai Grossjohann <kai@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- In-reply-to: <20040630135505.GA13539@xxxxxxxxxxx> (J.'s message of "Wed, 30 Jun 2004 15:55:05 +0200")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <86isd9xj1b.fsf@xxxxxxxxxxxxxxx> <20040630135505.GA13539@xxxxxxxxxxx>
J <jean.chalard@xxxxxxxxxxx> writes:
> - If you want this only occasionnally on a set of commands, you can't
> resort to the last method. You may use directly the globbing pattern
> I indicated, plus a range indicator : *(om[1]) is the last modified
> file in the directory, *(om[2]) the second last one, and *(om[1,2])
> the two first ones, most recent first. Then you can define a global
> alias for it, and/or bind a key to this in zle.
This sounds as if
less log.a/*(om[1])
would show me the newest file in that directory. That is not what
I'm looking for, but not too bad, either. Hm. Perhaps a function
"lessnew" expecting a directory and an optional number would do the
trick.
But if somebody knows the exact feature I was asking for, that would
be better.
Kai
Messages sorted by:
Reverse Date,
Date,
Thread,
Author