Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _files: -/ causes caller's _alternative to be disregarded
- X-seq: zsh-workers 39162
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: _files: -/ causes caller's _alternative to be disregarded
- Date: Fri, 2 Sep 2016 18:29:33 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=x46YgAklKHXzZktN OKPeRteJLjc=; b=vKZca9FwOiaQABvsXNFJJbzxT6x6KjbbWz3Rar/AT4JkyWLo C4ShgkU05TxqwKgNGXdbugiMH68emCntm9DtGcvdp0YGr4PQJA5mlB/IwlN7Zjdl OmQIHzMa7lawENLzh+JfjbdD4SqFjdCRCWafeO+Y+n5N5d70P4VB5RUEvQU=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=x46YgAklKHXzZkt NOKPeRteJLjc=; b=qSdXnTlGDjTFCyIGM0iV4qqGp0TE8TgUwwH/OKH+4A43WHT YCWW1Tsknyg9/jDTiNgFMiE2ghpZo0tZyThAAV9UaLsAXiYGczFP0dQTlJa8KrfQ HGoD8JAGfDppfwsI0Jv5VQ9XON2NFPjB6tcLJeNDVkWN+GIcjTFVx9HbepEA=
- In-reply-to: <160901220355.ZM6836@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20160902043202.GA25458@fujitsu.shahaf.local2> <160901220355.ZM6836@torch.brasslantern.com>
Bart Schaefer wrote on Thu, Sep 01, 2016 at 22:03:55 -0700:
> Good catch, though normally _path_files attempts to fix up glob quals
> to avoid this. However, doesn't (#q-/)(#q^-/) end up matching nothing?
> (I think that's WHY the aborted portion is inconsequential.) Is that
> really what is intended here?
I'm not sure what was intended, but I can imagine doing it differently:
Currently, list-dirs-first lists all directories in one group and all
matched files that are not directories in another. Instead, it could
have three groups: matched directories, matched non-directories,
unmatched non-directories.
For example, «_files -g "M*"» in the zsh tree could show "Misc", either
in its own group [as the only directory matching the pattern], or under
the globbed-files tag alongside plain files matching that pattern.
(For _files -/, this change would simply mean the 'directories' tag
would be empty and the 'globbed-files' tag would have the matches,
instead of the other way around. But for patterns that match some
directories, the change would be meaningful.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author