Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: filename cycling according to age, not name



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