From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28385 invoked from network); 30 Nov 1999 09:03:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Nov 1999 09:03:36 -0000 Received: (qmail 16472 invoked by alias); 30 Nov 1999 09:03:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8803 Received: (qmail 16460 invoked from network); 30 Nov 1999 09:03:30 -0000 Date: Tue, 30 Nov 1999 10:03:29 +0100 (MET) Message-Id: <199911300903.KAA19848@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Falk Hueffner's message of 29 Nov 1999 18:53:55 +0100 Subject: Re: bash-2.04 programmable completion Falk Hueffner wrote: > Sven Wischnowsky writes: > > > Just found this: > > > > > From: chet@nike.ins.cwru.edu (Chet Ramey) > > > Subject: Bash-2.04 Programmable Completion message 4 > > > Date: 05 Nov 1999 00:00:00 GMT > > > Message-ID: <991105173103.AA78566.SM@nike.ins.cwru.edu> > > [...] > > Two builtins `complete' and `compgen' with almost the same options, > > functions starting with underscore, -[PS] options, COMPREPLY, arrays > > holding names of stopped jobs and functions, etc. > > > > `compgen' is lightly different from what was our `compgen', it > > obviously just outputs the possible matches. But then -- the name. > > I think it would be BAD if bash had a similar system to zsh. It would > create confusion and increase work if one would want to use the same > completion scripts for both shells. So we should really try to have at > least a common base. I don't know if the two systems could be totally > compatible, since probably bash doesn't implement some needed features > like assiocative arrays. If this is impossible, the bash system should > at least not look similar. > > Could probably some competent person contact the bash maintainers on > this topic? Well... they may have read your mail already. (I got a mail from Chet Ramey where he answered my `Are we being monitored?' with `Of course. Great programmers steal good ideas wherever possible.') I don't think we can make anyone do anything just because their completion interface looks too much like ours. And, in fact, it only looks like a mixture of compctl and compgen. The former is what I would like to call deprecated and the latter is already dead. And as long as bash doesn't have all those spiffy utility functions we have, I don't think we'll be able to interchange completion functions. What might be possible (and this is more interesting for us anyway) is to hack something that allows us to use bash-completion functions. This also allows me to mention again that I would like to have a shell function named `compctl' that defines functions for the completion system -- as the last step before removing the compctl module. Something like this function (two of them, named `complete' and `compgen') together with some wrapper function used to call bash- completion-functions should probably be enough to use these functions and help users to migrate from bash to zsh. For several of the functions/commands this won't be needed, though, because we have our own functions for that. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de