From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1003 invoked from network); 15 Mar 1999 15:27:28 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Mar 1999 15:27:28 -0000 Received: (qmail 8682 invoked by alias); 15 Mar 1999 15:27:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5817 Received: (qmail 8668 invoked from network); 15 Mar 1999 15:26:44 -0000 Message-Id: <9903151510.AA47477@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: -subscript- completion for assoc array Date: Mon, 15 Mar 1999 16:10:32 +0100 From: Peter Stephenson Is there some math mode behaviour still built into subscript completion? I can't complete the -*- elements of _comps, although they are listed all right immediately after the [ and are entered OK with menu completion. % $_comps[-def tries to complete variable names. Significantly, it claims it's allowing two errors and the set I get is fignore hep_env_sh perl5lib testhash vers foo keys ret texinputs fpath lf sets ufmt so I suspect the - has been chucked out at some point. (Since you're wondering :-), the list consists of variables starting in f (delete two characters) or with e second (replace two characters) or with f second (delete one and transpose the other two).) I don't think it matters much, but I'm now using the slightly modified _subscript below. (It does show I shouldn't get the variable names at all in this case and hence compstate[parameter] isn't set properly, either.) #defcomp -subscript- if [[ ${(Pt)${compstate[parameter]}} = assoc* ]]; then compgen -k "( ${(kP)${compstate[parameter]}} )" else _compalso -math- fi -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy