zsh-users
 help / color / mirror / code / Atom feed
* filename cycling according to age, not name
@ 2004-06-30 13:38 Kai Grossjohann
  2004-06-30 13:44 ` Kai Grossjohann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kai Grossjohann @ 2004-06-30 13:38 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-06-30 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-30 13:38 filename cycling according to age, not name Kai Grossjohann
2004-06-30 13:44 ` Kai Grossjohann
     [not found] ` <20040630135505.GA13539@laposte.net>
2004-06-30 14:13   ` Kai Grossjohann
2004-06-30 16:05 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).