From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12600 invoked from network); 23 Dec 1999 15:28:22 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Dec 1999 15:28:22 -0000 Received: (qmail 5931 invoked by alias); 23 Dec 1999 15:28:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9145 Received: (qmail 5924 invoked from network); 23 Dec 1999 15:28:15 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: cd completion does not work in CVS version (unsafe word splitting in _alternative). Date: Thu, 23 Dec 1999 17:58:21 +0300 Message-ID: <001b01bf4d56$278c3710$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) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 With fresh CVS ... (actually, it was the reason I fetched CVS - it did not work in patched pws-12 as well) cd into $cdpath does not work. I tracked it down to: +_alternative:62> action=( _path_files -W \(/home/bor /home/bor/src /tools/src /archive/sni/dbase\) -/ ) +_alternative:63> _path_files -J -default- -W (/home/bor /home/bor/src /tools/src/archive/sni/dbase) -/ + The relevant lines in _alternative are: action=( $=action ) ${(e)action[1]} "$subopts[@]" "$expl[@]" "${(@e)~action[2,-1]}" In other words, _every_ action with SP in argument is doomed because it is splitted in multiple arguments. This is a general problem. In case of _cd this results from: _alternative \ 'local-directories:local directories:_path_files -/' \ "path-directories: directories in cdpath:_path_files -W \\(${${(@)cdpath:#.}}\\) -/" I don't see, why should we exclude `.'. If it is in cdpath and user requested path-directories - why not? /andrej