From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21296 invoked from network); 5 Nov 2002 05:10:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Nov 2002 05:10:53 -0000 Received: (qmail 29205 invoked by alias); 5 Nov 2002 05:10:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17906 Received: (qmail 29195 invoked from network); 5 Nov 2002 05:10:43 -0000 From: "Bart Schaefer" Message-Id: <1021105051003.ZM21024@candle.brasslantern.com> Date: Tue, 5 Nov 2002 05:10:03 +0000 In-Reply-To: <1036465301GKC.fvw@jareth.var.cx> Comments: In reply to Frank v Waveren "zcompsys space character problem" (Nov 5, 4:27am) References: <1036465301GKC.fvw@jareth.var.cx> X-Mailer: Z-Mail (5.0.0 30July97) To: Frank v Waveren , zsh-workers@sunsite.dk Subject: Re: zcompsys space character problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This has something to do with `compfiles'. Comparing the _complete_debug output for `ls a\ a/f' vs. `ls aa/f' shows (they're the same up to line 461 of _path_files): : _path_files:461:for while; compfiles -r tmp1 a\ a/f : _path_files:462:for while; tmp4=1 : _path_files:464:for while if; [[ a\ a/f == */* ]] : _path_files:465:for while then; tmp2=a\ a : _path_files:466:for while then; PREFIX=a\ a : _path_files:467:for while then; SUFFIX=/f : _path_files:478:for while if; (( tmp4 )) : _path_files:486:for while then; tmp2= : _path_files:487:for while then if; [[ -n ]] : _path_files:489:for while then elif; [[ -n ]] : _path_files:493:for while then else; compquote tmp1 tmp2 : _path_files:461:for while; compfiles -r tmp1 aa/f : _path_files:462:for while; tmp4=0 : _path_files:464:for while if; [[ aa/f == */* ]] : _path_files:465:for while then; tmp2=aa : _path_files:466:for while then; PREFIX=aa : _path_files:467:for while then; SUFFIX=/f : _path_files:478:for while if; (( tmp4 )) : _path_files:562:for while if; [[ aa/f != */* ]] : _path_files:570:for while; testpath=aa/ : _path_files:572:for while; tmp3=f Note how the code branches differently at line 478 because `compfiles' fails at line 461 in the case with the space. Changing line 461 from compfiles -r tmp1 "$tmp3" to compfiles -r tmp1 "${(Q)tmp3}" has the desired effect in this particular case, but I don't know if it is always correct. Sven, are you out there? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net