From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18459 invoked from network); 23 Jul 2001 04:25:14 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Jul 2001 04:25:14 -0000 Received: (qmail 15885 invoked by alias); 23 Jul 2001 04:25:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15454 Received: (qmail 15874 invoked from network); 23 Jul 2001 04:25:06 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) Date: Mon, 23 Jul 2001 08:25:01 +0400 (MSD) From: Andrej Borsenkow X-X-Sender: To: Felix Rosencrantz cc: Oliver Kiddle , zsh-workers Subject: Re: Generating completion functions from XML In-Reply-To: <20010722203414.62581.qmail@web10401.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 22 Jul 2001, Felix Rosencrantz wrote: > > I know there are some tricky exclusion list rules where it is not > always repetitive, though I think it is more common to use the same > set. Also, the other place for repetition is for equivalent flags > (short/long versions). > I really wish we had different notation for equivalent flags. Exclusion lists at this point are already overloaded and loko ugly (most important, tgey force us to repeat the whole line). Consider -b, --binary -t, --text where two lines are obviously incompatible. You can't write it using brace notation; you need *four* lines! like (-b --binary -t)--text... (-b --binary --text)-t... O.K. it could be shrtened to two lines but then quoting becomes unnatural and too error prone. > > >Another thing you might want to think about is if your XML format can > >somehow be flexible enough to include support for multiple languages. > > That's a great idea. And this is one of the places where the XML would > actually contain information you can't easily place in _arguments call. > Why? Assuming that main code for _arguments is in C (as I believe is the case) it makes it quite easy to add call to gettext there. Current message strings will the serve as keys to message catalog. Actually, GNU gettext makes such transition transition natural. We stil have strings that are not passed to C code, of course. But I doubt that XML will help here. The problem is not to generate them but rather to select at run time. - andrej