Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: problem with quoting in completion function
- X-seq: zsh-workers 16992
- From: Sven Wischnowsky <wischnow@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: problem with quoting in completion function
- Date: Tue, 16 Apr 2002 09:59:55 +0200
- In-reply-to: <1018728981.6553.7.camel@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1018728981.6553.7.camel@xxxxxxxxxxxxxxxxxxxxx>
Borsenkow Andrej wrote:
>
> This applies to 4.0.4 as distributed by Mandrake.
>
> I spent some time trying to understand why the following (suggested by
> Sven) does not work:
>
> compset -P "*,"
> all_sources=( ${all_sources:#(${~IPREFIX//,/|})} )
Bart already suggested using foo=( ${foo:#(${(Q)~IPREFIX//,/|})} ),
which works for me, even inside quotes etc., so nothing new here.
> ...
>
> If this quoting is intentional it does not seem to be described in
> documentation. But I still do not like it, it comes unexpected enough.
> It makes it impossible to simply compare strings.
What do you mean by `unexpected'? It has always been this way (module
a couple of bugs, as you know, having been here all the time ;-). And
the string is moved from $PREFIX to $IPREFIX without being changed, so
what could be more expectable?
And maybe you remember, that all this quoting stuff (which I won't
touch again without better reasons) always was a bit of a compromise,
being a very complicated matter -- nowadays even with the possibility
of nested quoting levels and whatnot. And still, it's cleaner now than
it was in previous stable versions.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author