* Re: Problem completing variables that contain spaces
@ 2001-03-28 10:49 Sven Wischnowsky
2001-03-28 22:03 ` Wayne Davison
0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 2001-03-28 10:49 UTC (permalink / raw)
To: zsh-workers
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/
>
> This problem is not specific to PWD.
I can't reproduce this. Can you try to make it do that starting with
-f and tell us the setup?
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem completing variables that contain spaces
2001-03-28 10:49 Problem completing variables that contain spaces Sven Wischnowsky
@ 2001-03-28 22:03 ` Wayne Davison
0 siblings, 0 replies; 3+ messages in thread
From: Wayne Davison @ 2001-03-28 22:03 UTC (permalink / raw)
To: Sven Wischnowsky; +Cc: zsh-workers
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..
^ permalink raw reply [flat|nested] 3+ messages in thread
* Problem completing variables that contain spaces
@ 2001-03-28 10:35 Wayne Davison
0 siblings, 0 replies; 3+ messages in thread
From: Wayne Davison @ 2001-03-28 10:35 UTC (permalink / raw)
To: Zsh Workers
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/
This problem is not specific to PWD.
..wayne..
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-03-28 21:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-28 10:49 Problem completing variables that contain spaces Sven Wischnowsky
2001-03-28 22:03 ` Wayne Davison
-- strict thread matches above, loose matches on Subject: below --
2001-03-28 10:35 Wayne Davison
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).