From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15754 invoked from network); 11 Feb 1999 14:29:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Feb 1999 14:29:09 -0000 Received: (qmail 21832 invoked by alias); 11 Feb 1999 14:28:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5340 Received: (qmail 21821 invoked from network); 11 Feb 1999 14:27:59 -0000 Message-Id: <9902111412.AA35808@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Bad interaction between -iprefix and -string Date: Thu, 11 Feb 1999 15:12:15 +0100 From: Peter Stephenson I'm gradually working through my compctl's; I'll try and make the result, including autodefcomping of functions and rebinding of completion widgets etc., available when it looks presentable. This came out of my attempts to handle dd, but here's a simpler test. The [[ ... ]] stuck on its own looks funny, but it relies on the side effect on IPREFIX. % defcomp stest % which __stest __stest () { if [[ -iprefix name= ]] then [[ -string , ]] complist -k '(yan tan tethera dick)' fi } % stest name=y # produces... % stest name=yan # OK so far, add `,te' by hand... % stest name=yan,te # produces... % stest name=yan,tedick # The te is being ignored, too. I checked and the corresponding compctl: % compctl -x 's[name=] n[-1,,],s[name=]' -k '(yan tan tethera dick)' -- stest works OK. While I'm here, another comment on compadd: it's a well-known fact that it doesn't check whether what you are adding actually matches what's on the command line. Is it easy to get it to do the check unless the -U option is given? It would be a little neater than having to call complist with -s for a list produced by $(...) if you don't want to postprocess the list. In fact, what effect does -U have on compadd at the moment, given that the existing prefix is deleted with or without it? -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy