Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Problem completing variables that contain spaces
- X-seq: zsh-workers 13833
 
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxxxxx
 
- Subject: PATCH: Re: Problem completing variables that contain spaces
 
- Date: Thu, 29 Mar 2001 10:58:39 +0200 (MET DST)
 
- In-reply-to: Wayne Davison's message of Wed, 28 Mar 2001 14:03:06 -0800 (PST)
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
 
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author