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

Re: erroneous completion when using {}



Jan Fedak wrote:

> When I use {} in a glob pattern like this:
> 
> $ cat some/path/{directory\ 1, directory\ 2,_
>                                            ^
> 					   cursor :)
> 
> and hit tab, my precious backslashes get lost:
> 
> $ cat some/path/{directory 1,directory 2,directory\ 

Oh, this is ugly. The problem is this: the completion code gets the
line tokenized, where the backslashes are turned int Bnull tokens. It
has to remove them for normal completion. After that comes the code
that looks for brace expansions, so that can't put the backslashes
back because it can't find where they were. Doing the brace expansion
stuff before removing the Null tokens won't work either because the
brace expansion code has to remove the `{foo,' things from the string.

And just quoting the strings the brace expansion code removes won't
work either because of `{{a,b},' (the braces of `{a,b}' would be
quoted). So we either need a special quoting function or a good idea.

I've got to think about this some more.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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