zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.dk
Subject: PATCH: Re: Problem completing variables that contain spaces
Date: Thu, 29 Mar 2001 10:58:39 +0200 (MET DST)	[thread overview]
Message-ID: <200103290858.KAA16011@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Wayne Davison's message of Wed, 28 Mar 2001 14:03:06 -0800 (PST)


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


                 reply	other threads:[~2001-03-29  8:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200103290858.KAA16011@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).