Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Tags again
- X-seq: zsh-workers 10535
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Tags again
- Date: Thu, 06 Apr 2000 11:18:12 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I've got to stop using zsh's productivity-enhancing features at work, it's
ruining my productivity...
What am I doing wrong this time? I want a script `asrcs' to complete *.lst
files and directories. So I set up:
zstyle ':completion:*:*:asrcs:*:*' file-patterns '*.lst:globbed-files' \
'*(-/):directories' '*:all-files'
zstyle ':completion:*:*:asrcs:*:*' tag-order 'globbed-files directories' \
all-files
(Note that asrcs is just using default, i.e. file, completion.) I was
expecting this to complete globbed files and directories with equal
priority. But it doesn't; it just completes the globbed files unless there
aren't any, then directories. If I change the order in the file-patterns so
that directories are first, it uses them instead. So tag-order doesn't
seem to be working as I expect --- if that wasn't there, though, this would
be pretty much the behaviour I would expect. Am I expecting wrong? The
documentation tends to support my expectations (I'll look through the
documentation nearer the release, but it's a massive job so I don't want
to have to do it more than once).
By the way, although that part seems to be working just as documented, it
might be nice to allow file-patterns to have a default tag, such as
`files', so that `*.lst' on its own would be interpreted as `*.lst:files'.
It's a little confusing if you miss out the tag part at present: stuff just
seems to disappear from the command line --- this may be an effect of menu
completion, but maybe it needs to be smarter about guessing things haven't
worked out the way it expected anyway. (The message I get says `Completing
corrections', but there's nothing there to correct, so I imagine
_approximate is simply going through it's usual motions, which is fair
enough.)
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author