From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1869 invoked from network); 21 Jun 1999 11:53:39 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 1999 11:53:39 -0000 Received: (qmail 15140 invoked by alias); 21 Jun 1999 11:53:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6758 Received: (qmail 15124 invoked from network); 21 Jun 1999 11:53:22 -0000 Message-ID: <4FBF540FF16FD1119D9600A0C94B2B51F29E95@napier.logica.co.uk> From: "Kiddle, Oliver" To: "'Peter Stephenson '" Cc: "'zsh-workers@sunsite.auc.dk'" Subject: PATCH: _subscript, Re: pws-23 Date: Mon, 21 Jun 1999 12:52:37 +0100 X-Mailer: Internet Mail Service (5.5.2448.0) _subscript in pws-23 seems to have been slightly damaged, probably due to word wrapping somewhere. The list= line for associative arrays should end with " ) and the following line should not have the closing bracket. A patch for this follows but I've also made a slight change: I use print -D to print the value of the array. This is rather useful with things like path where things get compacted to something like ~/bin. If it breaks anything else, we could use: if [[ ${compstate[parameter]} = *path* ]]; then, to only do it for path arrays. What might be useful is to add make zsh expand ${(D)...} in a similar way to print -D. BTW, the _hosts change which I sent last Friday (and which isn't in pws-23) doesn't work with my hosts file at home so I'll send a replacement later in the week. Peter: thanks for putting the .bin links in for the bzipped source: it didn't corrupt this time. Oliver Kiddle *** Completion/Base/_subscript.old Sun Jun 20 14:32:31 1999 --- Completion/Base/_subscript Mon Jun 21 12:38:24 1999 *************** *** 13,20 **** list=() for i in "$ind[@]"; do [[ "$i" = ${PREFIX}*${SUFFIX} ]] && ! list=( "$list[@]" "${(r:4:: ::):)i} ${(P)${compstate[parameter]}[$i]} ! ) done if [[ "$RBUFFER" = \]* ]]; then --- 13,20 ---- list=() for i in "$ind[@]"; do [[ "$i" = ${PREFIX}*${SUFFIX} ]] && ! list=( "$list[@]" \ ! "${(r:4:: ::):)i} `print -D ${(P)${compstate[parameter]}[$i]}`" ) done if [[ "$RBUFFER" = \]* ]]; then