From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9683 invoked from network); 25 Dec 1999 10:57:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Dec 1999 10:57:27 -0000 Received: (qmail 11745 invoked by alias); 25 Dec 1999 10:57:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9155 Received: (qmail 11738 invoked from network); 25 Dec 1999 10:57:20 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer thoth.mch.sni.de) From: "Andrej Borsenkow" To: "Peter Stephenson" , "Zsh hackers list" Subject: Arguments splitting (was: RE: PATCH: _cd not completing in $cdpath) Date: Sat, 25 Dec 1999 13:57:17 +0300 Message-ID: <000001bf4ec6$cf468660$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 > _alternative re-evaluates arguments passed to it, so a string like > '\(/home/pws /home/pws/tex\)' > isn't good enough as a path for _path_files -W because it gets split on > spaces, whereas _path_files needs it as a single argument. If that's the > correct behaviour for _alternative --- and I suspect it is, because there > are uses like > _alternative 'files:: _files' 'parameters:: _parameters' > --- then _cd needs fixing. > It is correct, that arguments, that are command line, need splitting (to get at this command line at all :-) But the current way to split them prevents any arguments with embedded LFS characters. What about something like eval "action=( $action )" Then we could define _alternative 'files::_files -W "(a b c)"' i.e. just use usual quoting. Note, that this (possibly - I did not check the code) applies to _arguments, _values etc - to any function, that is possibly using this format. It seems that a single utility function/builtin to habdle such arguments is quite timely. /andrej