From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26496 invoked from network); 29 Mar 2001 08:58:45 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 2001 08:58:45 -0000 Received: (qmail 16479 invoked by alias); 29 Mar 2001 08:58:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13833 Received: (qmail 16467 invoked from network); 29 Mar 2001 08:58:39 -0000 Date: Thu, 29 Mar 2001 10:58:39 +0200 (MET DST) Message-Id: <200103290858.KAA16011@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: Wayne Davison's message of Wed, 28 Mar 2001 14:03:06 -0800 (PST) Subject: PATCH: Re: Problem completing variables that contain spaces Wayne Davison wrote: > ... > > The critical bit appears to be: > > zstyle ':completion:*' completer _expand _complete > zstyle ':completion:*:expand:*' suffix false Ah, yes, now it could reproduce it. There was a missing (q) flag when comparing the prefix of the expansion generated so far with the expansion of the prefix alone. > [...] However, with this set: > > zstyle ':completion:*:expand:*' keep-prefix true > > the behavior of "suffix false" works exactly like "suffix true". [...] But that's correct, isn't it? Judging from the documentation (and the code and from what I intended... ;-). Bye Sven Index: Completion/Core/_expand =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_expand,v retrieving revision 1.35 diff -u -r1.35 _expand --- Completion/Core/_expand 2001/03/11 19:30:42 1.35 +++ Completion/Core/_expand 2001/03/29 08:58:19 @@ -93,7 +93,7 @@ eval 'epre=( ${(e)~${word%%/*}} )' 2>/dev/null if [[ -n "$epre" && $#epre -eq 1 ]]; then opre="${word%%/*}" - pre="$epre[1]" + pre="${(q)epre[1]}" [[ "$tmp" != changed || $#exp -gt 1 || "${opre}${exp[1]#${pre}}" != "$word" ]] && exp=( ${opre}${^exp#${pre}} ) fi -- Sven Wischnowsky wischnow@informatik.hu-berlin.de