From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20711 invoked from network); 8 May 2002 07:37:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 May 2002 07:37:53 -0000 Received: (qmail 25129 invoked by alias); 8 May 2002 07:37:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17086 Received: (qmail 25018 invoked from network); 8 May 2002 07:37:37 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15576.54689.459113.686818@wischnow.berkom.de> Date: Wed, 8 May 2002 09:37:05 +0200 To: zsh-workers@sunsite.dk Subject: Re: completion in quotes - " vs ' - no suffix added In-Reply-To: <1020506153137.ZM6413@candle.brasslantern.com> References: <6134254DE87BD411908B00A0C99B044F035BB41F@mowd019a.mow.siemens.ru> <1020506153137.ZM6413@candle.brasslantern.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Bart Schaefer wrote: > ... > > Hmm. It's slightly worse than that ... > > schaefer<510> functions _foo > _foo () { > local suf="/ \t\n" > [[ -n $compstate[quote] ]] && { suf="$compstate[quote]$suf" > compset -q } > _files -r $suf > } > schaefer<511> compdef _foo foo > schaefer<512> ls > don't stop/ rmthat/ > schaefer<514> foo ' > Completing file > don\'\''t\ stop rmthat/ > schaefer<514> foo " > Completing file > don\\'t\\ stop rmthat/ > > Wrong number of backslashes in both cases; that's why the trailing suffix > didn't get added. This looks similar to the problem we had with _values, > that Sven patched in 16998. No, it doesn't: there's nothing wrong, as far as I can see. Always remember, what `compset -q' is intended for, namely things like: zsh -c 'echo do Try it and you'll see that it does the right thing. At least it does for me. What Andrej probably wants is splitting the current string with a combination of `compset -[PS]' and the ${(z)...} parameter flag. I'd like to know how that command is then able to find the different sub-words in the quoted string if things like spaces are not quoted a second time. Or am I missing something? Bye Sven -- Sven Wischnowsky wischnow@berkom.de