Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _call (was: Re: PATCH: _diff (new), _prcs (upgrade))
- X-seq: zsh-workers 9539
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: _call (was: Re: PATCH: _diff (new), _prcs (upgrade))
- Date: Thu, 3 Feb 2000 10:16:20 +0100 (MET)
- In-reply-to: Alexandre Duret-Lutz's message of 02 Feb 2000 17:51:02 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Alexandre Duret-Lutz wrote:
> Sven> The only problem is that -- in cases like the _diff -- the users would
> Sven> have to know what the command has to do, but as long as we keep tags
> Sven> and styles documented...
>
> Could there be a way to make the completion
> functions autodescribe themselve? (i.e.
> print styles and tags used by the function,
> as well as other info worth to know, in some
> standard way). Perhaps it can be made by
> using some special comments in the completions
> functions and having a simple shell
> function that take a command as argument,
> that find the completion function
> associated and format out these comments.
For the tags there is alread _complete_help, but, as I already said
some time ago (answering a question from Andrej, I think): we can't
really find out which styles are used by a function for a certain
context because they can be tested anywhere and anytime. Because of
that I was thinking about some comment-collecting function like what
you suggested. Finding the functions (and -files) that are used is
simple (_complete_help already does that). The problem is the amount
of work that has to be done to write the comments.
And if we do that we should first try to define a comment-format
containing everything we probably might want to find out about
completion functions and that can also be used to automatically
generate tables/lists for the manual/info.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author