From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5658 invoked from network); 17 Nov 1998 14:27:14 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Nov 1998 14:27:14 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id JAA16438; Tue, 17 Nov 1998 09:25:15 -0500 (EST) Resent-Date: Tue, 17 Nov 1998 09:25:15 -0500 (EST) Message-Id: <9811171408.AA73308@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Updated patched version of zsh 3.1.5 Date: Tue, 17 Nov 1998 15:08:40 +0100 From: Peter Stephenson Resent-Message-ID: <"9Try21.0.n04.BTOKs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4663 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu For those wanting to be in the white heat of the technological revolution, I have updated the unofficial, not to say speculative, patched version of 3.1.5 at http://www.ifh.de/~pws/computing/zsh-3.1.5-patched.tar.gz This includes the associative array story up to date. This is definitely work in progress, but at the moment it looks as if it's usable as far as it goes, and if you don't use it it's not going to wreck your shell. The syntax is not fixed in stone, but will presumably stay ksh93-compatible. I repeat what I said before: some patch clashes have been resolved by hand, so there's no mechanical way of reproducing this version from the archive. The following is the list of additions since the first version. Some are corrections which should have been in that version. Added line in zle_tricky.c missed when patching by hand, spotted by Bart. (Whitespace is still non-canonical in the completion code where I have merged patches by hand.) Fixed up my compctl widgets patch for use with Sven's rewrite, which I hadn't done properly before. Bart's function fixes, 4471 Bart's doc fixes, 4472 Bart's PWD and OLDPWD reshuffle, 4589 My test-line-length patch for prompts, 4591 (`%(40l.yes.no)' outputs `yes' if at least 40 characters have already appeared on the line, `no' otherwise.) Configure patch from Wilfredo Sanchez in 4594, with some extra tabbification and without the setterm() hunk, since I've already renamed that to zsetterm(), avoiding the conflict My globbing fix for a bug which shows up in `case' constructs, 4595 Alternative version of the ~PWD patch (allow users to hash PWD explicitly if that's what turns them on), 4596 Bart's experimental associative array patch, 4598, plus various additions, 4599, 4602, 4608, 4641, 4653, 4654. No documentation yet; if you want to play with this, so far: % typeset -A hash # create associative array $hash % hash[one]=eins hash[two]=zwei # assign elements % hash=(one eins two zwei) # same, assign whole array (*) % print $hash[one] # retrieve elements eins % print $hash # whole array looks like normal array eins zwei % print ${(k)hash} # flag to get keys one two % print ${(kv)hash} # flag to get keys and values (**) one eins two zwei Comparison of (*) and (**) will reveal how to copy an associative array, `hash2=(${(kv}hash})', but you always need to `typeset -A hash2' first or an ordinary array will appear. There is a predefined special associative array $testhash, for testing purposes only, which will eventually disappear. My rewrite of prompt truncation, 4601 --- note this introduces a slight incompatibility in that the string to be truncated now runs by default to the end of the string, instead of only covering individual %-substitutions. If necessary, stick in an extra '%>>' to turn truncation off at the point you want. Bart's params error message fix, 4606 My input fix for 8 bit characters, 4612 Bart's version of the *** fix, 4624 Bart's parameter substitution flag delimiter fix, 4644 My special parameter unset fix, 4662 -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy