zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: <zsh-workers@sunsite.dk>
Subject: Re: Problem completing variables that contain spaces
Date: Wed, 28 Mar 2001 14:03:06 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.30.0103281344001.3108-100000@phong.blorf.net> (raw)
In-Reply-To: <200103281049.MAA10490@beta.informatik.hu-berlin.de>

On Wed, 28 Mar 2001, Sven Wischnowsky wrote:
> Wayne Davison wrote:
> > I noticed that the new completion code in the latest zsh code is
> > having trouble completing a variable that expands to a value that
> > contains spaces.  For instance, I was trying to complete $PWD in
> > a directory path that contained a space:
> >
> >  % mkdir 'two words'
> >  % chdir 'two words'
> >  % touch 1 2
> >  % ls -l $PWD/<TAB>
> >
> > Instead of $PWD remaining unexpanded and starting menu completion, it
> > expands to something strange like:
> >
> >     $PWD/full/path/goes/here/two\ words/
>
> I can't reproduce this.  Can you try to make it do that starting with
> -f and tell us the setup?

The critical bit appears to be:

zstyle ':completion:*' completer _expand _complete
zstyle ':completion:*:expand:*' suffix false

(Of course you need to call compinit and bindkey TAB to complete-word.)

I can't remember why I set suffix to false, though.  It was probably
back during the time that I didn't want $VAR/*<TAB> to expand the $VAR
(or something like that).  However, with this set:

zstyle ':completion:*:expand:*' keep-prefix true

the behavior of "suffix false" works exactly like "suffix true".
Note that the keep-prefix line isn't required to duplicate the bug.
In fact, you can tickle the bug without setting "suffix false" if you
add a wildcard:

 % ls -l $PWD/*<TAB>

..wayne..


  reply	other threads:[~2001-03-28 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-28 10:49 Sven Wischnowsky
2001-03-28 22:03 ` Wayne Davison [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-03-28 10:35 Wayne Davison

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=Pine.LNX.4.30.0103281344001.3108-100000@phong.blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=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).