Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: destructive list-expand

Bart Schaefer wrote:

> ...
> } I don't quite see where the quotes are getting stripped off, unless it's
> } actually get_comp_string() that's at fault.
> Guess what ... around line 1376 of zle_tricky.c ... I'm at a loss for
> what that code is meant to be doing or when it is ever the right thing.

All this is so disgusting... sigh.

That code is there to turn turn null tokens inside parameter expansions
into their original forms (single or double quotes) so that later code
can use them correctly because they won't be removed in the following

Unfortunately, this will only be done if we are completing *inside* the
parameter expansion (the parameter name). I'll have to try if it is
correct to change that part of the code to re-install quotes anywhere in
a parameter expansion in the word (well, it sounds right, doesn't it?).

But even with that there's still something fishy with list-expand which
I haven't any further into yet. And with _expand and functions that call

  beta% e=( '${(M)${(f)"$(<x)"}:#*2*}' )
  beta% echo ${(e)e}
  beta% echo ${(e)~e}
  111 222 333

Oh well. Anyone interested in fixing that?

No patch yet...


Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

Messages sorted by: Reverse Date, Date, Thread, Author