zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Sorting files by their extension
Date: Mon, 14 Aug 2006 20:02:32 -0700	[thread overview]
Message-ID: <060814200232.ZM8032@torch.brasslantern.com> (raw)
In-Reply-To: <20060814214005.GF4770@princo>

On Aug 14,  5:40pm, Jean-Rene David wrote:
} Subject: Sorting files by their extension
}
} Has anyone got a ready-made way to do this?

It's pretty much impossible to do as a glob qualifier, because sorting is
the very last thing to happen, after all the other qualifiers are done.
You can play games if you don't need the actual file name, or by first
assigning to an array variable and then manipulating the array, but with
only filename generation you're out of luck.

  x=( *(e%'reply=( $REPLY:e/$REPLY )'%) )
  print -l $x:t

Aside to PWS:  It appears that as a side-effect of the *(+func) syntax,
it is no longer possible to use "+" as the delimiter in *(e+'stmt'+).
This should at least be documented.


  parent reply	other threads:[~2006-08-15  3:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-14 21:40 Jean-Rene David
2006-08-14 22:24 ` Mikael Magnusson
2006-08-15  3:02 ` Bart Schaefer [this message]
2006-08-15  9:36   ` Peter Stephenson

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=060814200232.ZM8032@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).