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

RE: completion in quotes - " vs ' - no suffix added

> No, it doesn't: there's nothing wrong, as far as I can see. Always
> remember, what `compset -q' is intended for, namely things like:
>   zsh -c 'echo do<TAB>

Sure. And command can contain anything including file names with spaces
in them, special characters and whatever.

> Try it and you'll see that it does the right thing. At least it does
> for me.

It does not for me. It is the same ` vs " thing:

bor@itsrm2% zsh -c "cd ./a\\ b
Completing directory
a\\ b      c\\ d      uudecode/


bor@itsrm2% zsh -c 'cd ./a\ b/
Completing directory
a\ b/      c\ d/      uudecode/

> What Andrej probably wants is splitting the current string with a
> combination of `compset -[PS]' and the ${(z)...} parameter flag. I'd
> like to know how that command is then able to find the different
> sub-words in the quoted string if things like spaces are not quoted a
> second time.
> Or am I missing something?

I do not know. What I actually need is completion of file list in
quotes. This list cannot contain spaces (because mondoarchive cannot
handle them anyway) and wihout spaces compset -q does exactly the right
thing to me. Still as long as I have stumbled onto something that looks
like a bug  ... :-)


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