From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3111 invoked from network); 13 Apr 2002 20:16:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Apr 2002 20:16:38 -0000 Received: (qmail 3340 invoked by alias); 13 Apr 2002 20:16:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16976 Received: (qmail 3327 invoked from network); 13 Apr 2002 20:16:29 -0000 From: Borsenkow Andrej To: Zsh hackers list Subject: problem with quoting in completion function Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/1.0.2-5mdk Date: 14 Apr 2002 00:16:15 +0400 Message-Id: <1018728981.6553.7.camel@localhost.localdomain> Mime-Version: 1.0 This applies to 4.0.4 as distributed by Mandrake. I spent some time trying to understand why the following (suggested by Sven) does not work: compset -P "*," all_sources=( ${all_sources:#(${~IPREFIX//,/|})} ) The intention being to remove already present matches (separated by comma) from list of possible matches. It turned out, completion internally quotes IPREFIX, and in my case it had spaces inside (like "Installation CD") so pattern never matched. I.e. it tried to match Installation\ CD against Installation CD If this quoting is intentional it does not seem to be described in documentation. But I still do not like it, it comes unexpected enough. It makes it impossible to simply compare strings. I had to finally do compset -P "*," for i in ${(s:,:)IPREFIX}; do eval "all_sources=( \${all_sources:#$i} )" done but that is just ugly. -andrej