zsh-workers
 help / color / mirror / code / Atom feed
* Tags again
@ 2000-04-06 10:18 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2000-04-06 10:18 UTC (permalink / raw)
  To: Zsh hackers list

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-06 10:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-06 10:18 Tags again Peter Stephenson

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).