From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23656 invoked from network); 8 Jun 2001 15:31:53 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jun 2001 15:31:53 -0000 Received: (qmail 29276 invoked by alias); 8 Jun 2001 15:31:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14811 Received: (qmail 29265 invoked from network); 8 Jun 2001 15:31:24 -0000 Sender: kiddleo Message-ID: <3B20EFD9.A609093F@u.genie.co.uk> Date: Fri, 08 Jun 2001 16:31:37 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.15 i686) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: Re: One last _values / compvalues nit, and a nasty crash bug References: <200105100850.KAA04549@beta.informatik.hu-berlin.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Back on 10th May, Sven Wischnowsky wrote: > > Bart Schaefer wrote: > > > Now the bug -- press TAB three times after `: a' and get a crash: > > > > schaefer<501> function _tv { _values -S '' -s : 'a: :(foo)' b } > > schaefer<502> compdef _tv : > > schaefer<503> function _tv { _values -S '' -s : test 'a: :(foo)' b } > > schaefer<504> : afoo:afoo:BUG: attempt to free more than allocated. > > _values:149: command not found: 0R^O^H\M-^?\M-^?\M-^?\M-^?@T^O^H\M-^?\M-^?\M-^?\M-^?pR^O^H\M-^?\M-^?\M-^?\M-^?\M-@S^O^H\M-^?\M-^?\M-^?\M-^?\M-pP^O^H\M-^?\M-^?\M-^?\M-^?ws > > zsh: segmentation fault (core dumped) zsh-4.0.1-pre-4 > > That was because compvalues couldn't handle an empty string as a > separator. It still can't, but the patch makes it test that and report > an error. More below. But we use _values in a number of places with and empty string as a separator so this isn't good, for example: wget -n : $fpath[( both now produce the invalid separator error where they previously worked. I don't suppose it is only the -S separator (as opposed to -s) that compvalues doesn't like an empty string? Is there any chance that compvalues, comparguments etc could be given some sort of documentation. I know this was mentioned recently but it could go in either the zsh-development-guide or completion-style-guide file. Oliver