From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12128 invoked from network); 18 Jan 2000 19:58:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2000 19:58:22 -0000 Received: (qmail 8077 invoked by alias); 18 Jan 2000 19:58:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9355 Received: (qmail 8052 invoked from network); 18 Jan 2000 19:58:00 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _a2ps completion In-reply-to: "Sven Wischnowsky"'s message of "Tue, 18 Jan 2000 14:17:33 +0100." <200001181317.OAA01304@beta.informatik.hu-berlin.de> Date: Tue, 18 Jan 2000 20:00:24 +0000 From: Peter Stephenson Message-Id: Sven Wischnowsky wrote: > Is this a valid reason to add a `glob-pattern' (or `file-pattern') > style that is tested in _files and used to replace a function-supplied > pattern if there is any or to make _files use the pattern even if he > calling function did not use -g? Or is this a case of `if you want > that behaviour, copy and modify the completion function'? I vaguely thought about this (i.e. asking you to do it :-)). The only reason I didn't mention it was that I vaguely thought there wouldn't be enough context information. But this turns out to be nonsense: % a2ps ^Xh tags in context :complete::a2ps::argument-rest ... should be precise enough for anyone. In fact, my original idea was for `glob-override', which would only modify things if you already specified -g. But as long as it doesn't mess up completion of anything other than ordinary files --- i.e. it shouldn't spoil directory completions, just alter things with the tags files, globbed-files, or all-files --- it should be OK to use a more general facility. Preferably it should allow you to specify the tag you want altered, i.e. you may want to alter just globbed-files, leaving all-files doing its thing, or for special effects you might want all-files not to live up to its name (e.g., I want to get rm to complete discardable files like *.o by default (globbed-files), otherwise anything else (all-files), but I've decide I never want it to complete vmlinuz). In which case, I suppose `file-pattern' is the better name, since it can apply to all *files tags. You could argue it should be `selected-files' to go with `ignored-files', but I don't think they're really similar enough for that. I suppose I'm going to have to include Clint's patch in 9333. -- Peter Stephenson