Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
filename cycling according to age, not name
- X-seq: zsh-users 7630
- From: Kai Grossjohann <kai@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: filename cycling according to age, not name
- Date: Wed, 30 Jun 2004 15:38:40 +0200
- Cancel-lock: sha1:b7YFuyMFVq++dKtYwJCv31wQslg=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: news <news@xxxxxxxxxxxxx>
Normally, I'm happy with the normal filename completion behavior of
zsh. (After I've customized it to my liking.) But from time to
time, I would like to say "give me the newest file under the foo
directory".
Is there a way to do this?
The ideal would be that I enter a partial filename (say "foo/") and
then hit a key, and it inserts the newest file in that directory
("foo/x"), and then I hit the key again and it replaces the filename
with the second-youngest ("foo/a"). Right now, the TAB key does
something similar, but it sorts by filename, not by age.
Right now, I have a function which does { ls -lt "$@" | head -15; }
and then I copy and paste, but I'm sure it can be done in a more
convenient manner.
Kai
Messages sorted by:
Reverse Date,
Date,
Thread,
Author