From: Adam Spiers <adam@spiers.net>
To: zsh-workers@sunsite.auc.dk
Subject: Re: _files vs _path_files discussion (old thread)
Date: Sun, 12 Mar 2000 20:14:23 +0000 [thread overview]
Message-ID: <20000312201423.A10537@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <1000312194332.ZM27890@candle.brasslantern.com>; from schaefer@candle.brasslantern.com on Sun, Mar 12, 2000 at 07:43:32PM +0000
Bart Schaefer (schaefer@candle.brasslantern.com) wrote:
> On Mar 12, 1:02pm, Adam Spiers wrote:
> } Subject: Re: _files vs _path_files discussion (old thread)
> }
> } # Include non-hidden directories in globbed file completions
> } compstyle '::complete:*' \
> } tag-order 'globbed-files directories' all-files
> } compstyle '::complete:*:*:directories' file-patterns '*~.*(-/)'
> }
> } It's almost perfect ...
>
> Have you tried that with, say, `ls' ? I'll bet it ends up completing
> _only_ directories, because there's no -g option passed to _files for
> `ls' like there is for `tar'.
Of course you're right, and I had to change it back as soon as I
realised :-(
> If you have global directories file-patterns you're going to need them
> for globbed-files, too ...
Why's that? I'm still not fully understanding this, it seems.
> Do you have the GLOB_DOTS option set, by chance?
I did, until you pointed it out ;-)
> Effectively, what you want is to subdivide the 'directories' tag and
> have it treated like it has it's own internal tag-order.
That's right. Now why couldn't I have thought clearly enough to
realise that?
> One possibility would be to make file-patterns itself into a hierarchy;
> that is
>
> zstyle :completion::complete:tar::directories \
> file-patterns '*(-/)' '.*(-/)'
>
> would mean to use '.*(-/)' only if '*(-/)' returned nothing. The current
> meaning of the above is also expressible by
>
> zstyle :completion::complete:tar::directories \
> file-patterns '*(-/) .*(-/)'
>
> (that is, file-patterns is presently a string, not an array) so we would
> not be losing any functionality.
>
> Then all we need is a magic token in file-patterns to mean "use anything
> passed to _files with the -g option here" and global file-patterns would
> become really useful.
That sounds really nice.
next prev parent reply other threads:[~2000-03-12 20:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-17 7:28 PATCH: _rpm tweaks (_files vs _path_files discussion) Sven Wischnowsky
2000-03-11 22:22 ` _files vs _path_files discussion (old thread) Adam Spiers
2000-03-12 0:18 ` Bart Schaefer
2000-03-12 0:51 ` Adam Spiers
2000-03-12 6:21 ` Bart Schaefer
2000-03-12 6:34 ` Bart Schaefer
2000-03-12 13:02 ` Adam Spiers
2000-03-12 19:43 ` Bart Schaefer
2000-03-12 20:14 ` Adam Spiers [this message]
2000-03-12 22:51 ` Bart Schaefer
2000-03-13 13:07 Sven Wischnowsky
2000-03-13 17:54 ` 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=20000312201423.A10537@thelonious.new.ox.ac.uk \
--to=adam@spiers.net \
--cc=zsh-workers@sunsite.auc.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).