Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion for perldoc
- X-seq: zsh-workers 7672
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: completion for perldoc
- Date: Mon, 6 Sep 1999 19:18:10 +0100
- In-reply-to: <199909061137.NAA01937@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from Sven Wischnowsky on Mon, Sep 06, 1999 at 01:37:14PM +0200
- Mail-followup-to: zsh-workers@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199909061137.NAA01937@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Sven Wischnowsky (wischnow@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> Adam Spiers wrote:
> > I noticed Etc/Completion-style-guide soon after posting and realised
> > the many problems with that _perl* :-(
>
> Never mind. All this isn't fixed in stone yet and the `style-guide' is
> quite new.
I've been uploading the style-guide and the _arguments documentation
to my brain, and improved versions are on the way. _arguments is
great! However a few things perplex me:
- Why can't you have multiple MESSAGE:ACTION pairs with the
*:MESSAGE:ACTION form? I'm having to resort to using an auxiliary
function, e.g.:
_perldoc {
_arguments -s \
'-h:help:' \
'(-q)-f:Perl built-in function:_perl_builtin_funcs' \
'(-f)-q:Perl FAQ keyword:' \
'*:Perl pod pages:_perl_pods'
}
_perl_pods {
local nm="$compstate[nmatches]"
_perl_modules
_perl_basepods
_path_files -J "Perl modules and .pods" -/ -g '*.(pod|pm)'
[[ nm -ne compstate[nmatches] ]]
}
- Is it possible to do something like (-foo)*:MESSAGE:ACTION, i.e.
specifying completion for normal args only if -foo hasn't been
specified?
> P.P.S.: The function system started as an attempt to make the syntax
> easier to understand. And now we have a completion function
> that explains what it does by giving an equivalent `compctl' ;-)
<rofl> I hadn't thought of that :-D
Messages sorted by:
Reverse Date,
Date,
Thread,
Author