zsh-users
 help / color / mirror / code / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
To: zsh-users@sunsite.dk
Subject: filename cycling according to age, not name
Date: Wed, 30 Jun 2004 15:38:40 +0200	[thread overview]
Message-ID: <86isd9xj1b.fsf@rumba.de.uu.net> (raw)

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


             reply	other threads:[~2004-06-30 13:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30 13:38 Kai Grossjohann [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86isd9xj1b.fsf@rumba.de.uu.net \
    --to=kai@emptydomain.de \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).