From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13976 invoked from network); 3 Feb 2000 09:16:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Feb 2000 09:16:32 -0000 Received: (qmail 4204 invoked by alias); 3 Feb 2000 09:16:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9539 Received: (qmail 4196 invoked from network); 3 Feb 2000 09:16:23 -0000 Date: Thu, 3 Feb 2000 10:16:20 +0100 (MET) Message-Id: <200002030916.KAA10368@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Alexandre Duret-Lutz's message of 02 Feb 2000 17:51:02 +0100 Subject: Re: _call (was: Re: PATCH: _diff (new), _prcs (upgrade)) 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@informatik.hu-berlin.de