From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13182 invoked from network); 1 Feb 2001 17:57:52 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Feb 2001 17:57:52 -0000 Received: (qmail 24564 invoked by alias); 1 Feb 2001 17:57:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13427 Received: (qmail 24553 invoked from network); 1 Feb 2001 17:57:47 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Space-expansion problem in dev-8 In-Reply-To: Your message of "Thu, 01 Feb 2001 09:41:14 PST." Date: Thu, 01 Feb 2001 17:57:19 +0000 From: Peter Stephenson > If a filename contains spaces (or other escapable characters) and you > expand it via wild-carding, the spaces are not escaped. The fix is probably something like the following, but Sven may have better ideas. This is leaving my cursor at the end of the word for some reason. Probably _expand was written before ${(q)...} existed. Index: Completion/Core/_expand =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_expand,v retrieving revision 1.33 diff -u -r1.33 _expand --- Completion/Core/_expand 2000/10/11 12:19:24 1.33 +++ Completion/Core/_expand 2001/02/01 17:46:47 @@ -68,7 +68,7 @@ # Now try globbing. [[ "$force" = *g* ]] || zstyle -T ":completion:${curcontext}:" glob && - eval 'exp=( ${~exp} ); exp=( ${exp//(#b)([][()|*?^#~<>\\=])/\\${match[1]}} )' 2>/dev/null + eval 'exp=( ${~exp} ); exp=( ${(q)exp} )' 2>/dev/null # If we don't have any expansions or only one and that is the same # as the original string, we let other completers run. -- Peter Stephenson Software Engineer Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070