From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8699 invoked from network); 6 Apr 2000 10:20:54 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Apr 2000 10:20:54 -0000 Received: (qmail 15121 invoked by alias); 6 Apr 2000 10:20:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10535 Received: (qmail 15107 invoked from network); 6 Apr 2000 10:20:43 -0000 Date: Thu, 06 Apr 2000 11:18:12 +0100 From: Peter Stephenson Subject: Tags again To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FSL00D9DBABHX@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT 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