Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: _a2ps completion
- X-seq: zsh-workers 9355
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: _a2ps completion
- Date: Tue, 18 Jan 2000 20:00:24 +0000
- In-reply-to: "Sven Wischnowsky"'s message of "Tue, 18 Jan 2000 14:17:33 +0100." <200001181317.OAA01304@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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 <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author